added fixes that close twanvl's #105 and #107

This commit is contained in:
Carl Miller, Jr
2021-02-15 02:25:47 -05:00
parent 3a243f23e6
commit 6de715557e
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -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
+8
View File
@@ -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<wxString> {
size_t operator()(const wxString& k) const {
return hash<wstring>()(k.ToStdWstring());
}
};
#endif