Fix warning in Clang 4.0 Mac build.
../src/views/mac/SkNSView.mm:18:31: note: expanded from macro 'RETINA_API_AVAILABLE' #define RETINA_API_AVAILABLE (defined(MAC_OS_X_VERSION_10_7) && \ ^ ../src/views/mac/SkNSView.mm:404:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] #if RETINA_API_AVAILABLE After this change, Clang 4.0 builds everything on Mac without warning. Change-Id: I9c8f63e009eaa69366ba9361a811df46a1204c24 Reviewed-on: https://skia-review.googlesource.com/9741 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
9e62df6ecd
commit
04ef48c200
@ -15,8 +15,12 @@ static_assert(SK_SUPPORT_GPU, "not_implemented_for_non_gpu_build");
|
||||
|
||||
//#define FORCE_REDRAW
|
||||
// Can be dropped when we no longer support 10.6.
|
||||
#define RETINA_API_AVAILABLE (defined(MAC_OS_X_VERSION_10_7) && \
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
|
||||
#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||
#define RETINA_API_AVAILABLE 1
|
||||
#else
|
||||
#define RETINA_API_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
@implementation SkNSView
|
||||
@synthesize fWind, fTitle, fOptionsDelegate, fGLContext;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user