From c73c9f899916c46e7757ee22979749496edf6a8c Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Mon, 7 May 2018 14:09:01 -0700 Subject: [PATCH 1/2] Fix the C++ assertion --- Source/Base/ASBaseDefines.h | 3 --- Source/Details/Transactions/_ASAsyncTransaction.mm | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Base/ASBaseDefines.h b/Source/Base/ASBaseDefines.h index 4b562e192..6706b6da4 100755 --- a/Source/Base/ASBaseDefines.h +++ b/Source/Base/ASBaseDefines.h @@ -23,9 +23,6 @@ // wrap constants, only C functions. See StackOverflow for more details: // http://stackoverflow.com/questions/1041866/in-c-source-what-is-the-effect-of-extern-c #ifdef __cplusplus -# ifndef __STRICT_ANSI__ - #warning "Texture must be compiled with std=c++11. gnu++ is not supported and may cause issues." -# endif # define ASDISPLAYNODE_EXTERN_C_BEGIN extern "C" { # define ASDISPLAYNODE_EXTERN_C_END } #else diff --git a/Source/Details/Transactions/_ASAsyncTransaction.mm b/Source/Details/Transactions/_ASAsyncTransaction.mm index a7c25b948..fad801e93 100644 --- a/Source/Details/Transactions/_ASAsyncTransaction.mm +++ b/Source/Details/Transactions/_ASAsyncTransaction.mm @@ -26,6 +26,10 @@ #import #import +# ifndef __STRICT_ANSI__ + #warning "Texture must be compiled with std=c++11 to prevent layout issues. gnu++ is not supported. This is hopefully temporary." +# endif + #define ASAsyncTransactionAssertMainThread() NSAssert(0 != pthread_main_np(), @"This method must be called on the main thread"); NSInteger const ASDefaultTransactionPriority = 0; From 98463e8107161a3dfa839fd7f77c89839b8549af Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Mon, 7 May 2018 14:14:42 -0700 Subject: [PATCH 2/2] Fix indentation --- Source/Details/Transactions/_ASAsyncTransaction.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Details/Transactions/_ASAsyncTransaction.mm b/Source/Details/Transactions/_ASAsyncTransaction.mm index fad801e93..a5ff2f072 100644 --- a/Source/Details/Transactions/_ASAsyncTransaction.mm +++ b/Source/Details/Transactions/_ASAsyncTransaction.mm @@ -26,9 +26,9 @@ #import #import -# ifndef __STRICT_ANSI__ +#ifndef __STRICT_ANSI__ #warning "Texture must be compiled with std=c++11 to prevent layout issues. gnu++ is not supported. This is hopefully temporary." -# endif +#endif #define ASAsyncTransactionAssertMainThread() NSAssert(0 != pthread_main_np(), @"This method must be called on the main thread");