From c24ba2f612d89d6dd15871cdb8a66080859d9ab3 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Thu, 6 Jul 2006 11:42:25 +0000 Subject: Fix bugs in GetNextTokenSpace and GetNextToken Fix bugs in Pcd Build tool generation for ExMap Fix a few other bugs. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@800 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/build/pcd/action/CollectPCDAction.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Tools') diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java index 396a1af442..79d488a173 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java @@ -430,7 +430,7 @@ class GuidTable { // If so, return the GuidTable index. // for (int i = 0; i < al.size(); i++) { - if (al.get(i).equals(uuid)) { + if (al.get(i).compareTo(uuid) == 0) { return i; } } @@ -752,7 +752,7 @@ class ExMapTable { } private ArrayList al; - private ArrayList alComment; + private Map alComment; private String phase; private int len; private int bodyLineNum; @@ -760,7 +760,7 @@ class ExMapTable { public ExMapTable (String phase) { this.phase = phase; al = new ArrayList(); - alComment = new ArrayList(); + alComment = new HashMap(); bodyLineNum = 0; len = 0; } @@ -815,7 +815,7 @@ class ExMapTable { str += e.localTokenIdx.toString() + ", "; str += e.guidTableIdx.toString(); - str += "}" + " /* " + alComment.get(index) + " */" ; + str += "}" + " /* " + alComment.get(e) + " */" ; if (index != al.size() - 1) { str += ","; @@ -834,9 +834,11 @@ class ExMapTable { public int add (int localTokenIdx, long exTokenNum, int guidTableIdx, String name) { int index = len; - len++; - al.add(new ExTriplet(guidTableIdx, exTokenNum, localTokenIdx)); - alComment.add(name); + len++; + ExTriplet et = new ExTriplet(guidTableIdx, exTokenNum, localTokenIdx); + + al.add(et); + alComment.put(et, name); return index; } -- cgit v1.2.3