[vala/switch-to-gir-gio: 28/43] 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-gio: 28/43] girparser: Use an HashSet for merged symbols.
- Date: Thu, 6 Jan 2011 00:32:59 +0000 (UTC)
commit cb4d1ff6d3faf56939aa4e328e85b06daaa1501d
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 173903e..b633260 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]