From be358f8d24120908f3983665e301487e9c8af0d6 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Fri, 30 May 2014 23:59:36 +0200 Subject: [PATCH] cppbind: use Hash iterators to extract simgear::Map --- simgear/nasal/cppbind/NasalHash.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/simgear/nasal/cppbind/NasalHash.hxx b/simgear/nasal/cppbind/NasalHash.hxx index a800e5ba..641644c2 100644 --- a/simgear/nasal/cppbind/NasalHash.hxx +++ b/simgear/nasal/cppbind/NasalHash.hxx @@ -286,11 +286,10 @@ from_nasal_helper( naContext c, const simgear::Map* ) { nasal::Hash hash = from_nasal_helper(c, ref, static_cast(0)); - std::vector const& keys = hash.keys(); simgear::Map map; - for(size_t i = 0; i < keys.size(); ++i) - map[ keys[i] ] = hash.get(keys[i]); + for(nasal::Hash::const_iterator it = hash.begin(); it != hash.end(); ++it) + map[ it->getKey() ] = it->getValue(); return map; } -- 2.39.5