mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
add #ifdefs for OSX-specific code
This commit is contained in:
@@ -92,7 +92,9 @@ bool update_available() {
|
||||
class CheckUpdateThread : public wxThread {
|
||||
public:
|
||||
void* Entry() override {
|
||||
// Work();
|
||||
#ifndef __APPLE__
|
||||
Work();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@ template <> void GetDefaultMember::handle(const tribool& v) { value = to_sc
|
||||
template <> void GetDefaultMember::handle(const Vector2D& v) { value = to_script(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y)); }
|
||||
template <> void GetDefaultMember::handle(const Color& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const wxDateTime& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const unsigned long& v) { value = to_script((int)v); }
|
||||
#ifdef __APPLE__
|
||||
template <> void GetDefaultMember::handle(const unsigned long& v) { value = to_script((int)v); }
|
||||
#endif
|
||||
void GetDefaultMember::handle(const ScriptValueP& v) { value = v; }
|
||||
void GetDefaultMember::handle(const ScriptP& v) { value = v; }
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <util/version.hpp>
|
||||
#include <unordered_map>
|
||||
#ifdef __APPLE__
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
|
||||
template <typename T> class Defaultable;
|
||||
template <typename T> class Scriptable;
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <wx/txtstrm.h>
|
||||
#include <unordered_map>
|
||||
#ifdef __APPLE__
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
|
||||
template <typename T> class Defaultable;
|
||||
template <typename T> class Scriptable;
|
||||
|
||||
+9
-7
@@ -106,11 +106,13 @@ 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());
|
||||
}
|
||||
};
|
||||
#ifdef __APPLE__
|
||||
#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
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user