diff --git a/include/lwpp/customobject_handler.h b/include/lwpp/customobject_handler.h index 5728b59..270f9fe 100644 --- a/include/lwpp/customobject_handler.h +++ b/include/lwpp/customobject_handler.h @@ -74,7 +74,8 @@ namespace lwpp try { T *plugin = (T *) instance; - plugin->Evaluate(CustomObjAccess(lw_coa)); + auto ca = CustomObjAccess(lw_coa); + plugin->Evaluate(ca); } catch (std::exception &e) { diff --git a/include/lwpp/debug.h b/include/lwpp/debug.h index 7779882..746d286 100644 --- a/include/lwpp/debug.h +++ b/include/lwpp/debug.h @@ -95,8 +95,8 @@ namespace lwpp protected: int sync() { - ::OutputDebugStringA(str().c_str()); - str(std::basic_string()); // Clear the string buffer + ::OutputDebugStringA(basic_debugbuf::str().c_str()); + basic_debugbuf::str(std::basic_string()); // Clear the string buffer return 0; } }; @@ -109,11 +109,11 @@ namespace lwpp basic_dostream() : std::basic_ostream(new basic_debugbuf()) { - setf(std::ios::unitbuf); + basic_dostream::setf(std::ios::unitbuf); } ~basic_dostream() { - delete rdbuf(); + delete basic_dostream::rdbuf(); } }; diff --git a/include/lwpp/instances.h b/include/lwpp/instances.h index 70a7410..c38478f 100644 --- a/include/lwpp/instances.h +++ b/include/lwpp/instances.h @@ -109,4 +109,4 @@ namespace lwpp { } } -#endif LWPP_INSTANCES_H \ No newline at end of file +#endif // LWPP_INSTANCES_H \ No newline at end of file diff --git a/include/lwpp/modeler.h b/include/lwpp/modeler.h index b33c97e..8a5c37d 100644 --- a/include/lwpp/modeler.h +++ b/include/lwpp/modeler.h @@ -14,7 +14,7 @@ namespace lwpp #define MSEL_MODE_VOLUME 2 #define MSEL_MODE_EDGE 3 - class ModelerState : protected GlobalBase + class ModelerState : public GlobalBase { public: diff --git a/src/global.cpp b/src/global.cpp index aad1e4f..16852b1 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -112,8 +112,8 @@ namespace lwpp void LightWave::Init() { //systemID = (unsigned int)(unsigned long) (SuperGlobal (LWPP_SYSTEMID_GLOBAL, GFUSE_TRANSIENT)); - systemID = (unsigned int) (unsigned long) (SuperGlobal (LWSYSTEMID_GLOBAL, GFUSE_ACQUIRE)); - productInfo = ( unsigned int ) (unsigned long) SuperGlobal( LWPRODUCTINFO_GLOBAL, GFUSE_TRANSIENT ); + systemID = (unsigned int) (uintptr_t) (SuperGlobal (LWSYSTEMID_GLOBAL, GFUSE_ACQUIRE)); + productInfo = ( unsigned int ) (uintptr_t) SuperGlobal( LWPRODUCTINFO_GLOBAL, GFUSE_TRANSIENT ); } int LightWave::GetNumCores() diff --git a/src/platform_cocoa.mm b/src/platform_cocoa.mm index 05b3cc1..6c3a951 100644 --- a/src/platform_cocoa.mm +++ b/src/platform_cocoa.mm @@ -1,4 +1,4 @@ -#include "platform_cocoa.h" +#include "lwpp/platform_cocoa.h" #include "lwdialog.h" #include diff --git a/src/platform_win32.cpp b/src/platform_win32.cpp index e684cc0..f848609 100644 --- a/src/platform_win32.cpp +++ b/src/platform_win32.cpp @@ -37,7 +37,7 @@ namespace lwpp std::string getTempPath() { - DWORD result = ::GetTempPath(0, ""); + DWORD result = ::GetTempPath(0, const_cast("") ); if(result == 0) { throw std::runtime_error("Could not get system temp path"); diff --git a/src/strptime.cpp b/src/strptime.cpp index b232898..630c792 100644 --- a/src/strptime.cpp +++ b/src/strptime.cpp @@ -27,6 +27,7 @@ static int date_get_num(const char **pp, return val; } +#ifndef __APPLE__ /* small strptime for ffmpeg */ const char *strptime(const char *p, const char *fmt, struct tm *dt) { @@ -95,4 +96,5 @@ const char *strptime(const char *p, const char *fmt, struct tm *dt) } } return p; -} \ No newline at end of file +} +#endif \ No newline at end of file