From cb293173000ce3823fcbc115fd63625e9ce4b2b2 Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Mon, 7 May 2018 15:28:48 -0700 Subject: [PATCH] #trivial Fix the C++ assertion (#911) * Fix the C++ assertion * Fix indentation --- 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 4b562e192d..6706b6da47 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 a7c25b9487..a5ff2f0729 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;