From 46ae049f01385055b381807724aa562c13eacbe9 Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 31 Aug 2006 08:21:04 +0000 Subject: [PATCH] Compilation warnings --- src/OCCViewer/OCCViewer_ViewPort.h | 8 ++++++++ src/OCCViewer/OCCViewer_ViewPort3d.h | 8 ++++++++ src/SOCC/SOCC_ViewModel.cxx | 2 +- src/SPlot2d/SPlot2d_ViewModel.cxx | 4 ++-- src/SUPERVGraph/SUPERVGraph_ViewFrame.h | 11 ++++++++++- src/SVTK/SVTK_ViewModel.cxx | 8 ++++---- 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewPort.h b/src/OCCViewer/OCCViewer_ViewPort.h index 357dd8d0c..b4742b293 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.h +++ b/src/OCCViewer/OCCViewer_ViewPort.h @@ -35,6 +35,10 @@ class QPainter; class OCCViewer_ViewSketcher; class OCCViewer_ViewTransformer; +#ifdef WIN32 +#pragma warning ( disable:4251 ) +#endif + /*! \class OCCViewer_ViewPort Visualisation canvas of SUIT-based application @@ -111,4 +115,8 @@ private: static int nCounter; /* objects counter */ }; +#ifdef WIN32 +#pragma warning ( default:4251 ) +#endif + #endif diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.h b/src/OCCViewer/OCCViewer_ViewPort3d.h index 204b8eb99..5f923003a 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.h +++ b/src/OCCViewer/OCCViewer_ViewPort3d.h @@ -28,6 +28,10 @@ class QRect; +#ifdef WIN32 +#pragma warning ( disable:4251 ) +#endif + class OCCVIEWER_EXPORT OCCViewer_ViewPort3d: public OCCViewer_ViewPort { Q_OBJECT @@ -89,4 +93,8 @@ private: double myScale; }; +#ifdef WIN32 +#pragma warning ( default:4251 ) +#endif + #endif diff --git a/src/SOCC/SOCC_ViewModel.cxx b/src/SOCC/SOCC_ViewModel.cxx index 8d425a47c..999c2dd85 100755 --- a/src/SOCC/SOCC_ViewModel.cxx +++ b/src/SOCC/SOCC_ViewModel.cxx @@ -671,7 +671,7 @@ bool SOCC_Viewer::getTrihedronSize( double& theNewSize, double& theSize ) float aSizeInPercents = SUIT_Session::session()->resourceMgr()->doubleValue("Viewer","TrihedronSize", 105.); - static float EPS = 5.0E-3; + static double EPS = 5.0E-3; theSize = getTrihedron()->Size(); theNewSize = aMaxSide*aSizeInPercents / 100.0; diff --git a/src/SPlot2d/SPlot2d_ViewModel.cxx b/src/SPlot2d/SPlot2d_ViewModel.cxx index 4ac94388f..2c6de1611 100644 --- a/src/SPlot2d/SPlot2d_ViewModel.cxx +++ b/src/SPlot2d/SPlot2d_ViewModel.cxx @@ -114,10 +114,10 @@ void SPlot2d_Viewer::rename( const Handle(SALOME_InteractiveObject)& IObject, void SPlot2d_Viewer::renameAll( const Handle(SALOME_InteractiveObject)& IObj, const QString& name ) { SUIT_ViewManager* vm = getViewManager(); - if( vm ) + if ( vm ) { const QPtrVector& wnds = vm->getViews(); - for( int i=0; i( wnds.at( i ) ); rename( IObj, name, pwnd->getViewFrame() ); diff --git a/src/SUPERVGraph/SUPERVGraph_ViewFrame.h b/src/SUPERVGraph/SUPERVGraph_ViewFrame.h index f2d336449..2a5e7f03b 100755 --- a/src/SUPERVGraph/SUPERVGraph_ViewFrame.h +++ b/src/SUPERVGraph/SUPERVGraph_ViewFrame.h @@ -37,6 +37,10 @@ #include +#ifdef WIN32 +#pragma warning ( disable:4251 ) +#endif + class SUPERVGRAPH_EXPORT SUPERVGraph_View: public QWidget, public SUIT_PopupClient { Q_OBJECT; public: @@ -127,5 +131,10 @@ class SUPERVGRAPH_EXPORT SUPERVGraph_ViewFrame : public SUIT_ViewWindow { QToolBar* myToolBar; SUPERVGraph_View* myView; -}; +}; + +#ifdef WIN32 +#pragma warning ( default:4251 ) +#endif + #endif diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index 61cde9d5b..e884edec7 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -152,10 +152,10 @@ void SVTK_Viewer::setTrihedronSize( const int theSize, const bool theRelative ) if (SUIT_ViewManager* aViewManager = getViewManager()) { QPtrVector aViews = aViewManager->getViews(); - for (int i = 0; i < aViews.count(); i++) { - if (TViewWindow* aView = dynamic_cast(aViews.at(i))) { - aView->SetTrihedronSize(theSize, theRelative); - } + for ( uint i = 0; i < aViews.count(); i++ ) + { + if ( TViewWindow* aView = dynamic_cast(aViews.at( i )) ) + aView->SetTrihedronSize( theSize, theRelative ); } } } -- 2.39.2