소스 검색

OSX/iOS: Updated to Xcode5.

bkaradzic 12 년 전
부모
커밋
d5360deaa6
3개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      include/bx/macros.h
  2. 1 0
      include/bx/sem.h
  3. 4 4
      include/bx/string.h

+ 1 - 1
include/bx/macros.h

@@ -50,7 +50,7 @@
 #	define BX_NO_VTABLE
 #	define BX_OVERRIDE
 #	define BX_PRINTF_ARGS(_format, _args) __attribute__ ( (format(__printf__, _format, _args) ) )
-#	if BX_COMPILER_CLANG || BX_PLATFORM_IOS
+#	if BX_COMPILER_CLANG || BX_PLATFORM_OSX || BX_PLATFORM_IOS
 #		define BX_THREAD /* not supported right now */
 #	else
 #		define BX_THREAD __thread

+ 1 - 0
include/bx/sem.h

@@ -77,6 +77,7 @@ namespace bx
 			BX_CHECK(0 == result, "pthread_mutex_lock %d", result);
 
 #		if BX_PLATFORM_NACL || BX_PLATFORM_OSX || BX_PLATFORM_IOS
+			BX_UNUSED(_msecs);
 			BX_CHECK(-1 == _msecs, "NaCl, iOS and OSX don't support pthread_cond_timedwait at this moment.");
 			while (0 == result
 			&&     0 >= m_count)

+ 4 - 4
include/bx/string.h

@@ -37,7 +37,7 @@ namespace bx
 	{
 		const char* end = _str + _max;
 		const char* ptr;
-		for (ptr = _str; ptr < end && *ptr != '\0'; ++ptr);
+		for (ptr = _str; ptr < end && *ptr != '\0'; ++ptr) {};
 		return ptr - _str;
 	}
 
@@ -117,21 +117,21 @@ namespace bx
 	/// Skip whitespace.
 	inline const char* strws(const char* _str)
 	{
-		for (; isspace(*_str); ++_str);
+		for (; isspace(*_str); ++_str) {};
 		return _str;
 	}
 
 	/// Skip non-whitespace.
 	inline const char* strnws(const char* _str)
 	{
-		for (; !isspace(*_str); ++_str);
+		for (; !isspace(*_str); ++_str) {};
 		return _str;
 	}
 
 	/// Skip word.
 	inline const char* strword(const char* _str)
 	{
-		for (char ch = *_str++; isalnum(ch) || '_' == ch; ch = *_str++);
+		for (char ch = *_str++; isalnum(ch) || '_' == ch; ch = *_str++) {};
 		return _str-1;
 	}