[vala/switch-to-gir: 28/51] girparser: Use an HashSet for merged symbols.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir: 28/51] girparser: Use an HashSet for merged symbols.
- Date: Fri, 18 Mar 2011 17:48:47 +0000 (UTC)
commit 188076e7e5f8c8d4c26077c3b3164dbdd69ae0db
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]