diff --git a/.gitignore b/.gitignore index e430d78f..d2193be3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ Release/ # Application folders .vs -.vscode # vs2010 ipch/ diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..de7425e9 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,32 @@ +{ + "configurations": [ + { + "name": "Mac", + "includePath": [ + "${workspaceFolder}/src/**" + ], + "defines": [ + "TARGET_OS_MAC" + ], + "macFrameworkPath": [ + "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "c11", + "cppStandard": "c++14", + "intelliSenseMode": "clang-x64" + }, + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/src/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c11", + "cppStandard": "c++14", + "intelliSenseMode": "clang-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..cfc8e1f0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "files.autoGuessEncoding": true, + "files.encoding": "gb2312" +} \ No newline at end of file diff --git a/src/kiwano/core/SmartPtr.hpp b/src/kiwano/core/SmartPtr.hpp index ba73c09a..9b1989fd 100644 --- a/src/kiwano/core/SmartPtr.hpp +++ b/src/kiwano/core/SmartPtr.hpp @@ -268,7 +268,7 @@ inline bool operator<(const SmartPtr<_Ty, _ProxyTy>& lhs, const SmartPtr<_UTy, _ } // template class cannot specialize std::swap, -// so implement a Swap Function in kiwano namespace +// so implement a swap function in kiwano namespace template inline void swap(SmartPtr<_Ty, _ProxyTy>& lhs, SmartPtr<_Ty, _ProxyTy>& rhs) noexcept { diff --git a/src/kiwano/macros.h b/src/kiwano/macros.h index fd5ab8a7..27d54fb3 100644 --- a/src/kiwano/macros.h +++ b/src/kiwano/macros.h @@ -77,7 +77,7 @@ // ///////////////////////////////////////////////////////////// -#ifdef KGE_PLATFORM_WINDOWS +#if defined(KGE_PLATFORM_WINDOWS) #if KGE_RENDER_ENGINE == KGE_RENDER_ENGINE_NONE # undef KGE_RENDER_ENGINE @@ -157,6 +157,32 @@ KGE_SUPPRESS_WARNING(4251) #include #include +#elif defined(KGE_PLATFORM_MACOS) + +#if KGE_RENDER_ENGINE == KGE_RENDER_ENGINE_NONE +# undef KGE_RENDER_ENGINE +# define KGE_RENDER_ENGINE KGE_RENDER_ENGINE_OPENGL +#endif + +#define KGE_DEPRECATED(...) + +#define KGE_SUPPRESS_WARNING_PUSH +#define KGE_SUPPRESS_WARNING(CODE) +#define KGE_SUPPRESS_WARNING_POP + +#ifndef KGE_API +# if defined(KGE_USE_DLL) +# define KGE_API +# elif defined(KGE_EXPORT_DLL) +# define KGE_API +# endif +#endif + +#ifndef KGE_API +/* Building or calling Kiwano as a static library */ +# define KGE_API +#endif + #else #if KGE_RENDER_ENGINE == KGE_RENDER_ENGINE_DIRECTX