소스 검색

ifdef around my stb macro

Ron Aaron 5 년 전
부모
커밋
1cc9fa9619
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      nuklear.h
  2. 2 0
      src/nuklear.h

+ 2 - 0
nuklear.h

@@ -5685,10 +5685,12 @@ template<typename T> struct nk_alignof{struct Big {T x; char c;}; enum {
 #define STB_TRUETYPE_IMPLEMENTATION
 #endif
 
+#ifndef STBTT_malloc
 static nk_handle fictional_handle = {0};
 
 #define STBTT_malloc(x,u)  nk_malloc( fictional_handle, 0, x ) 
 #define STBTT_free(x,u)    nk_mfree( fictional_handle , x)
+#endif
 
 #endif /* NK_NUKLEAR_H_ */
 

+ 2 - 0
src/nuklear.h

@@ -5466,9 +5466,11 @@ template<typename T> struct nk_alignof{struct Big {T x; char c;}; enum {
 #define STB_TRUETYPE_IMPLEMENTATION
 #endif
 
+#ifndef STBTT_malloc
 static nk_handle fictional_handle = {0};
 
 #define STBTT_malloc(x,u)  nk_malloc( fictional_handle, 0, x ) 
 #define STBTT_free(x,u)    nk_mfree( fictional_handle , x)
+#endif
 
 #endif /* NK_NUKLEAR_H_ */