From b228864567c8102518a806b4dab6851748c78c6b Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 12 Feb 2015 21:38:27 +0100 Subject: [PATCH] [DEV] remove some MacOs & IOs warning --- etk/math/Vector2D.cpp | 2 +- etk/math/Vector3D.h | 2 +- etk/stdTools.cpp | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/etk/math/Vector2D.cpp b/etk/math/Vector2D.cpp index 8245221..910aea4 100644 --- a/etk/math/Vector2D.cpp +++ b/etk/math/Vector2D.cpp @@ -87,7 +87,7 @@ std::ostream& etk::operator <<(std::ostream& _os, const std::vector& _ob vec2 vec2rotate(const vec2& _val, const vec2& _point, float _angle) { vec2 out = _val; - #ifdef __TARGET_OS__MacOs + #if (defined(__TARGET_OS__MacOs) || defined(__TARGET_OS__IOs)) float sinAngle = sin(_angle); float cosAngle = cos(_angle); #else diff --git a/etk/math/Vector3D.h b/etk/math/Vector3D.h index cb25384..cb560ee 100644 --- a/etk/math/Vector3D.h +++ b/etk/math/Vector3D.h @@ -34,7 +34,7 @@ namespace etk { m_floats[2] = (T)43523424; m_floats[3] = (T)23452345; #endif - #ifndef __TARGET_OS__MacOs + #if (!defined(__TARGET_OS__MacOs) && !defined(__TARGET_OS__IOs)) // hide a bullet warning (void)btInfinityMask; #endif diff --git a/etk/stdTools.cpp b/etk/stdTools.cpp index bd6a24c..b7f51cb 100644 --- a/etk/stdTools.cpp +++ b/etk/stdTools.cpp @@ -354,7 +354,10 @@ namespace etk { } template<> std::string to_string(const int64_t& _val) { char tmpVal[256]; - #if (defined(__TARGET_OS__Android) || defined(__TARGET_OS__Windows)) + #if ( defined(__TARGET_OS__Android) \ + || defined(__TARGET_OS__Windows) \ + || defined(__TARGET_OS__MacOs) \ + || defined(__TARGET_OS__IOs)) sprintf(tmpVal, "%lld", _val); #else sprintf(tmpVal, "%ld", _val); @@ -378,7 +381,10 @@ namespace etk { } template<> std::string to_string(const uint64_t& _val) { char tmpVal[256]; - #if (defined(__TARGET_OS__Android) || defined(__TARGET_OS__Windows)) + #if ( defined(__TARGET_OS__Android) \ + || defined(__TARGET_OS__Windows) \ + || defined(__TARGET_OS__MacOs) \ + || defined(__TARGET_OS__IOs)) sprintf(tmpVal, "%llu", _val); #else sprintf(tmpVal, "%lu", _val); @@ -915,7 +921,10 @@ int32_t etk::string_to_int32_t(const std::string& _str, int _base) { } int64_t etk::string_to_int64_t(const std::string& _str, int _base) { int64_t ret = 0; - #if (defined(__TARGET_OS__Android) || defined(__TARGET_OS__Windows)) + #if ( defined(__TARGET_OS__Android) \ + || defined(__TARGET_OS__Windows) \ + || defined(__TARGET_OS__MacOs) \ + || defined(__TARGET_OS__IOs)) sscanf(_str.c_str(), "%lld", &ret); #else sscanf(_str.c_str(), "%ld", &ret); @@ -939,7 +948,10 @@ uint32_t etk::string_to_uint32_t(const std::string& _str, int _base) { } uint64_t etk::string_to_uint64_t(const std::string& _str, int _base) { uint64_t ret = 0; - #if (defined(__TARGET_OS__Android) || defined(__TARGET_OS__Windows)) + #if ( defined(__TARGET_OS__Android) \ + || defined(__TARGET_OS__Windows) \ + || defined(__TARGET_OS__MacOs) \ + || defined(__TARGET_OS__IOs)) sscanf(_str.c_str(), "%llu", &ret); #else sscanf(_str.c_str(), "%lu", &ret);