mirror of https://github.com/acidanthera/audk.git
1. Fix EDKT230 "A library class should not be specified for a module more than one time"
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1460 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c757cb321c
commit
90bed2f7ff
|
@ -21,12 +21,7 @@ public class LibraryClassVector {
|
||||||
private Vector<LibraryClassIdentification> vLibraryClass = new Vector<LibraryClassIdentification>();
|
private Vector<LibraryClassIdentification> vLibraryClass = new Vector<LibraryClassIdentification>();
|
||||||
|
|
||||||
public int findLibraryClass(LibraryClassIdentification lib) {
|
public int findLibraryClass(LibraryClassIdentification lib) {
|
||||||
for (int index = 0; index < vLibraryClass.size(); index++) {
|
return findLibraryClass(lib.getLibraryClassName());
|
||||||
if (vLibraryClass.elementAt(index).equals(lib)) {
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findLibraryClass(String name) {
|
public int findLibraryClass(String name) {
|
||||||
|
@ -47,8 +42,10 @@ public class LibraryClassVector {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addLibraryClass(LibraryClassIdentification lib) {
|
public void addLibraryClass(LibraryClassIdentification lib) {
|
||||||
|
if (findLibraryClass(lib) == -1) {
|
||||||
vLibraryClass.addElement(lib);
|
vLibraryClass.addElement(lib);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setLibraryClass(LibraryClassIdentification lib, int index) {
|
public void setLibraryClass(LibraryClassIdentification lib, int index) {
|
||||||
vLibraryClass.setElementAt(lib, index);
|
vLibraryClass.setElementAt(lib, index);
|
||||||
|
|
Loading…
Reference in New Issue