clean up things a little bit
This commit is contained in:
parent
d395af0f4c
commit
debcc8fbc6
2 changed files with 9 additions and 12 deletions
|
@ -292,8 +292,10 @@ struct DBusAny {
|
|||
if(type != 'a' || !signature || signature[0] != '{')
|
||||
throw new Exception("Can't convert type " ~ cast(char) type ~ " to " ~ T.stringof);
|
||||
T ret;
|
||||
foreach(pair; array)
|
||||
foreach(pair; array) {
|
||||
enforce(pair.type == 'e');
|
||||
ret[pair.entry.key.to!(KeyType!T)] = pair.entry.value.to!(ValueType!T);
|
||||
}
|
||||
return ret;
|
||||
} else static assert(false, "Can't convert variant to " ~ T.stringof);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue