move key/value wrapper function into anonymous namespace in ScriptingEnvironment
This commit is contained in:
parent
d4d2d127d1
commit
22ce4c24fb
@ -41,13 +41,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <osmium/osm.hpp>
|
#include <osmium/osm.hpp>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
namespace {
|
||||||
// wrapper method as luabind doesn't automatically overload funcs w/ default parameters
|
// wrapper method as luabind doesn't automatically overload funcs w/ default parameters
|
||||||
template<class T>
|
template<class T>
|
||||||
auto get_value_by_key(T const& object, const char *key) -> decltype(object.get_value_by_key(key))
|
auto get_value_by_key(T const& object, const char *key) -> decltype(object.get_value_by_key(key))
|
||||||
{
|
{
|
||||||
return object.get_value_by_key(key, "");
|
return object.get_value_by_key(key, "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScriptingEnvironment::ScriptingEnvironment(const char *file_name)
|
ScriptingEnvironment::ScriptingEnvironment(const char *file_name)
|
||||||
: file_name(file_name)
|
: file_name(file_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user