Skip to content

Commit

Permalink
Merge pull request karelia#96 from danielpunkass/fix-defines
Browse files Browse the repository at this point in the history
Quiet Xcode 9.3 #warning defines
  • Loading branch information
iljaiwas authored Apr 11, 2018
2 parents f810c2c + 263afe6 commit e3fc901
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions IMBCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,17 @@ typedef void (^IMBCompletionBlock)(id inResult,NSError* inError);
#define IMBRunningOnMavericksOrNewer() (NSAppKitVersionNumber >= NSAppKitVersionNumber10_9)
#define IMBRunningOnYosemite10103OrNewer() ([[NSProcessInfo processInfo] respondsToSelector:@selector(isOperatingSystemAtLeastVersion:)] && [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10,10,3}])

#define IMB_COMPILING_WITH_LION_OR_NEWER_SDK defined(MAC_OS_X_VERSION_10_7)
#define IMB_COMPILING_WITH_SNOW_LEOPARD_OR_NEWER_SDK defined(MAC_OS_X_VERSION_10_6)
#if defined(MAC_OS_X_VERSION_10_7)
#define IMB_COMPILING_WITH_LION_OR_NEWER_SDK 1
#else
#define IMB_COMPILING_WITH_LION_OR_NEWER_SDK 0
#endif

#if defined(MAC_OS_X_VERSION_10_6)
#define IMB_COMPILING_WITH_SNOW_LEOPARD_OR_NEWER_SDK 1
#else
#define IMB_COMPILING_WITH_SNOW_LEOPARD_OR_NEWER_SDK 0
#endif

//----------------------------------------------------------------------------------------------------------------------

Expand Down
6 changes: 5 additions & 1 deletion IMBObjectViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,11 @@ - (NSRect) previewPanel:(QLPreviewPanel*)inPanel sourceFrameOnScreenForPreviewIt
// the first Retina Macs didn't run 10.6, we can safely assume that where competent
// calculation of Retina-based frame is required, we will have the benefit of the
// new convenience method on NSWindow.
#define USE_OLD_CONVERT_METHOD (!defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7))
#if (!defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7))
#define USE_OLD_CONVERT_METHOD 1
#else
#define USE_OLD_CONVERT_METHOD 0
#endif
#if USE_OLD_CONVERT_METHOD
if (IMBRunningOnLionOrNewer() == NO)
{
Expand Down

0 comments on commit e3fc901

Please sign in to comment.