[DEV] remove some MacOs & IOs warning

This commit is contained in:
Edouard DUPIN 2015-02-12 21:38:27 +01:00
parent 1a81769f15
commit b228864567
3 changed files with 18 additions and 6 deletions

View File

@ -87,7 +87,7 @@ std::ostream& etk::operator <<(std::ostream& _os, const std::vector<bvec2 >& _ob
vec2 vec2rotate(const vec2& _val, const vec2& _point, float _angle) { vec2 vec2rotate(const vec2& _val, const vec2& _point, float _angle) {
vec2 out = _val; vec2 out = _val;
#ifdef __TARGET_OS__MacOs #if (defined(__TARGET_OS__MacOs) || defined(__TARGET_OS__IOs))
float sinAngle = sin(_angle); float sinAngle = sin(_angle);
float cosAngle = cos(_angle); float cosAngle = cos(_angle);
#else #else

View File

@ -34,7 +34,7 @@ namespace etk {
m_floats[2] = (T)43523424; m_floats[2] = (T)43523424;
m_floats[3] = (T)23452345; m_floats[3] = (T)23452345;
#endif #endif
#ifndef __TARGET_OS__MacOs #if (!defined(__TARGET_OS__MacOs) && !defined(__TARGET_OS__IOs))
// hide a bullet warning // hide a bullet warning
(void)btInfinityMask; (void)btInfinityMask;
#endif #endif

View File

@ -354,7 +354,10 @@ namespace etk {
} }
template<> std::string to_string<int64_t>(const int64_t& _val) { template<> std::string to_string<int64_t>(const int64_t& _val) {
char tmpVal[256]; 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); sprintf(tmpVal, "%lld", _val);
#else #else
sprintf(tmpVal, "%ld", _val); sprintf(tmpVal, "%ld", _val);
@ -378,7 +381,10 @@ namespace etk {
} }
template<> std::string to_string<uint64_t>(const uint64_t& _val) { template<> std::string to_string<uint64_t>(const uint64_t& _val) {
char tmpVal[256]; 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); sprintf(tmpVal, "%llu", _val);
#else #else
sprintf(tmpVal, "%lu", _val); 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 etk::string_to_int64_t(const std::string& _str, int _base) {
int64_t ret = 0; 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); sscanf(_str.c_str(), "%lld", &ret);
#else #else
sscanf(_str.c_str(), "%ld", &ret); 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 etk::string_to_uint64_t(const std::string& _str, int _base) {
uint64_t ret = 0; 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); sscanf(_str.c_str(), "%llu", &ret);
#else #else
sscanf(_str.c_str(), "%lu", &ret); sscanf(_str.c_str(), "%lu", &ret);