Ver código fonte

Fix old cast and unused variables

Julien Finet 14 anos atrás
pai
commit
a9e68f1366

+ 2 - 1
Libs/Visualization/VTK/Widgets/ctkVTKThumbnailView.cpp

@@ -283,7 +283,8 @@ void ctkVTKThumbnailViewPrivate::updateCamera()
   int mainViewerWid = ren->GetRenderWindow()->GetSize()[0];
   int mainViewerHit = ren->GetRenderWindow()->GetSize()[1];
   // width of the FOVBox that represents MainViewer window.
-  double boxHalfWid = boxHalfHit * (double)mainViewerWid / (double)mainViewerHit;
+  double boxHalfWid = boxHalfHit * static_cast<double>(mainViewerWid)
+                       / static_cast<double>(mainViewerHit);
 
   // configure and position the FOVBox
   double data [24];

+ 1 - 2
Libs/Widgets/ctkCheckablePushButton.cpp

@@ -66,7 +66,6 @@ ctkCheckablePushButtonPrivate::ctkCheckablePushButtonPrivate(ctkCheckablePushBut
 //-----------------------------------------------------------------------------
 void ctkCheckablePushButtonPrivate::init()
 {
-  Q_Q(ctkCheckablePushButton);
 }
 
 //-----------------------------------------------------------------------------
@@ -248,7 +247,7 @@ void ctkCheckablePushButton::paintEvent(QPaintEvent * _event)
   style()->drawControl(QStyle::CE_PushButtonBevel, &opt, &p, this);
   // TBD is PE_PanelButtonCommand better ?
   //style()->drawPrimitive(QStyle::PE_PanelButtonCommand, &opt, &p, this);
-  int buttonHeight = opt.rect.height();
+  //int buttonHeight = opt.rect.height();
   uint tf = d->TextAlignment;
   if (this->style()->styleHint(QStyle::SH_UnderlineShortcut, &opt, this))
     {