]> OCCT Git - occt-copy.git/commitdiff
0027080: Coding - eliminate CLang compiler warning on OS X: unused parameter (in...
authorkgv <kgv@opencascade.com>
Tue, 19 Jan 2016 11:17:45 +0000 (14:17 +0300)
committerabv <abv@opencascade.com>
Thu, 21 Jan 2016 12:50:24 +0000 (15:50 +0300)
src/Draw/Draw_Window_1.mm
src/OpenGl/OpenGl_Window_1.mm
src/ViewerTest/ViewerTest_ViewerCommands_1.mm

index e419a5a37ec235750629f86bda8512b41334724a..222d72881af37be2df5cd8a2279300f3e19b21c0 100644 (file)
@@ -48,7 +48,7 @@
 
 - (void )drawRect: (NSRect )theRect
 {
-
+  (void )theRect;
   NSRect aBounds = NSMakeRect (0.0, 0.0, myImage.size.width, myImage.size.height);
 
   [myImage drawInRect: aBounds
@@ -511,7 +511,8 @@ void Draw_Window::SetColor (const Standard_Integer& theColor)
 //=======================================================================
 void Draw_Window::SetMode (const Standard_Integer& theMode)
 {
-  //
+  // unsupported
+  (void )theMode;
 }
 
 //=======================================================================
@@ -539,8 +540,11 @@ Standard_Boolean Draw_Window::Save (Standard_CString theFileName) const
   NSBitmapImageFileType aFileType = (NSBitmapImageFileType )[[aFileTypeDict valueForKey: aFileExtension] intValue];
   NSBitmapImageRep* anImageRep = [NSBitmapImageRep imageRepWithData: [myImageBuffer TIFFRepresentation]];
 
+  NSDictionary* anImgProps = [NSDictionary dictionaryWithObject: [NSNumber numberWithFloat: 0.8]
+                                                         forKey: NSImageCompressionFactor];
+
   NSData* aData = [anImageRep representationUsingType: aFileType 
-                                           properties: nil];
+                                           properties: anImgProps];
 
   Standard_Boolean isSuccess = [aData writeToFile: aFileName
                                        atomically: NO];
index 8fa77eb145335684db7cd7443e117bf54bada1e4..c2b02b2b7d2c4d354455ab00f34e4bc6c10db440 100644 (file)
@@ -66,6 +66,7 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
 #endif
   mySwapInterval (theCaps->swapInterval)
 {
+  (void )theDriver;
   myPlatformWindow->Size (myWidth, myHeight);
 
 #if defined(__APPLE__)
index a05daa99b8384e89e4fe16ffc4dd9edf75bc6ac6..e29bd354e818301bffb14bf3f80d17556fc423ce 100644 (file)
@@ -105,6 +105,7 @@ TCollection_AsciiString FindViewId (const NSWindow* theWindow)
 
 - (void )windowWillClose: (NSNotification* )theNotification
 {
+  (void )theNotification;
   TCollection_AsciiString aViewId = "";
   if (ViewerTest_myViews.IsBound2 (ViewerTest::CurrentView()))
   {
@@ -196,6 +197,7 @@ static void getMouseCoords (NSView*           theView,
 // =======================================================================
 - (void )drawRect: (NSRect )theDirtyRect
 {
+  (void )theDirtyRect;
   VT_ProcessExpose();
 }
 
@@ -269,6 +271,7 @@ static void getMouseCoords (NSView*           theView,
 // =======================================================================
 - (void )rightMouseUp: (NSEvent* )theEvent
 {
+  (void )theEvent;
   VT_ProcessButton3Release();
 }