diff --git a/src/util/io/get_member.cpp b/src/util/io/get_member.cpp index eba0c8ad..51d00ce2 100644 --- a/src/util/io/get_member.cpp +++ b/src/util/io/get_member.cpp @@ -29,6 +29,7 @@ template <> void GetDefaultMember::handle(const Color& v) { value = to_sc template <> void GetDefaultMember::handle(const wxDateTime& v) { value = to_script(v); } void GetDefaultMember::handle(const ScriptValueP& v) { value = v; } void GetDefaultMember::handle(const ScriptP& v) { value = v; } +template <> void GetDefaultMember::handle(const unsigned long& v) { value = to_script((int)v); } // ----------------------------------------------------------------------------- : GetMember diff --git a/src/util/prec.hpp b/src/util/prec.hpp index c142e350..7e60b10c 100644 --- a/src/util/prec.hpp +++ b/src/util/prec.hpp @@ -106,3 +106,11 @@ typedef unsigned int UInt; #define assert(exp) (void)( (exp) || (msvc_assert(nullptr, _CRT_WIDE(#exp), _CRT_WIDE(__FILE__), __LINE__), 0) ) #endif +#if wxVERSION_NUMBER < 3100 +// wx <= 3.1 doesn't include a hash implementation for wxString +template <> struct std::hash { + size_t operator()(const wxString& k) const { + return hash()(k.ToStdWstring()); + } +}; +#endif