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; }