[vala] girparser: Use an HashSet for merged symbols.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Use an HashSet for merged symbols.
- Date: Mon, 4 Apr 2011 14:17:30 +0000 (UTC)
commit 8799dcd24d9365692b55c3504e0f807387a6ba18
Author: Luca Bruno <lucabru src gnome org>
Date: Fri Dec 24 19:36:05 2010 +0100
girparser: Use an HashSet for merged symbols.
vala/valagirparser.vala | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 25c6f14..1135c66 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -857,7 +857,7 @@ public class Vala.GirParser : CodeVisitor {
return null;
}
- void merge (SymbolInfo info, ArrayList<SymbolInfo> colliding, ArrayList<SymbolInfo> merged) {
+ void merge (SymbolInfo info, ArrayList<SymbolInfo> colliding, HashSet<SymbolInfo> merged) {
if (info.symbol is Struct) {
var gtype_struct_for = info.girdata["glib:is-gtype-struct-for"];
if (gtype_struct_for != null && current_symbols_info.contains (gtype_struct_for)) {
@@ -1038,9 +1038,8 @@ public class Vala.GirParser : CodeVisitor {
}
void merge_add_process (Symbol container) {
- var merged = new ArrayList<SymbolInfo> ();
- foreach (var name in current_symbols_info.get_keys ()) {
- var colliding = current_symbols_info[name];
+ var merged = new HashSet<SymbolInfo> ();
+ foreach (var colliding in current_symbols_info.get_values ()) {
foreach (var info in colliding) {
merge (info, colliding, merged);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]