1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0031021: Coding Rules - Deprecation warnings on OSX within Draw_Window_1.mm

Use new renamed enumeration values instead of deprecated ones.
This commit is contained in:
kgv 2019-10-15 20:46:57 +03:00 committed by apn
parent 6ed44b1ca9
commit 89073268fd

View File

@ -36,6 +36,12 @@
#define NSCompositingOperationSourceOver NSCompositeSourceOver #define NSCompositingOperationSourceOver NSCompositeSourceOver
#endif #endif
#if !defined(MAC_OS_X_VERSION_10_14) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_14)
#define NSBitmapImageFileTypePNG NSPNGFileType
#define NSBitmapImageFileTypeBMP NSBMPFileType
#define NSBitmapImageFileTypeJPEG NSJPEGFileType
#define NSBitmapImageFileTypeGIF NSGIFFileType
#endif
@interface Draw_CocoaView : NSView @interface Draw_CocoaView : NSView
{ {
@ -561,10 +567,10 @@ Standard_Boolean Draw_Window::Save (Standard_CString theFileName) const
NSString* aFileExtension = [[aFileName pathExtension] lowercaseString]; NSString* aFileExtension = [[aFileName pathExtension] lowercaseString];
NSDictionary* aFileTypeDict = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary* aFileTypeDict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: NSPNGFileType], @"png", [NSNumber numberWithInt: NSBitmapImageFileTypePNG], @"png",
[NSNumber numberWithInt: NSBMPFileType], @"bmp", [NSNumber numberWithInt: NSBitmapImageFileTypeBMP], @"bmp",
[NSNumber numberWithInt: NSJPEGFileType], @"jpg", [NSNumber numberWithInt: NSBitmapImageFileTypeJPEG], @"jpg",
[NSNumber numberWithInt: NSGIFFileType], @"gif", [NSNumber numberWithInt: NSBitmapImageFileTypeGIF], @"gif",
nil]; nil];
if ([aFileTypeDict valueForKey: aFileExtension] == NULL) if ([aFileTypeDict valueForKey: aFileExtension] == NULL)
{ {