From: mpv Date: Tue, 11 Aug 2015 08:58:37 +0000 (+0300) Subject: Eliminate some Visual Studio warnings X-Git-Tag: V_1.4.0_beta4~407 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=773696804ec4f543a421f1ebd71be86d95cb581b;p=modules%2Fshaper.git Eliminate some Visual Studio warnings --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp index b91780545..c4d9add35 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_IGESExport.cpp @@ -134,7 +134,7 @@ bool IGESExport(const std::string& theFileName, // perform shape writing if( ICW.AddShape( theShape->impl() ) ) { ICW.ComputeModel(); - return ICW.Write(theFileName.c_str()); + return ICW.Write(theFileName.c_str()) == Standard_True; } return false; } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Tools.h b/src/GeomAlgoAPI/GeomAlgoAPI_Tools.h index f53385c81..fa950240e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Tools.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Tools.h @@ -13,11 +13,11 @@ namespace GeomAlgoAPI_Tools { -class GEOMALGOAPI_EXPORT Localizer +class Localizer { public: - Localizer(); - ~Localizer(); + GEOMALGOAPI_EXPORT Localizer(); + GEOMALGOAPI_EXPORT ~Localizer(); private: std::string myCurLocale; }; diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index bf4661ad2..aeb1489c4 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -44,10 +44,6 @@ #include -#ifdef WNT // to avoid too long decorated name warning -#pragma warning( disable : 4503 ) -#endif - // myLab contains: // TDataStd_Name - name of the object // TDataStd_IntegerArray - state of the object execution, transaction ID of update diff --git a/src/ModelAPI/ModelAPI_Data.h b/src/ModelAPI/ModelAPI_Data.h index 222934699..1d37ad60f 100644 --- a/src/ModelAPI/ModelAPI_Data.h +++ b/src/ModelAPI/ModelAPI_Data.h @@ -7,6 +7,10 @@ #ifndef ModelAPI_Data_H_ #define ModelAPI_Data_H_ +#ifdef _WINDOWS // to avoid too long decorated name warning +#pragma warning( disable : 4503 ) +#endif + #include "ModelAPI.h" #include #include diff --git a/src/ParametersPlugin/ParametersPlugin_EvalListener.h b/src/ParametersPlugin/ParametersPlugin_EvalListener.h index b9004c3d3..02b5e6c52 100644 --- a/src/ParametersPlugin/ParametersPlugin_EvalListener.h +++ b/src/ParametersPlugin/ParametersPlugin_EvalListener.h @@ -16,13 +16,13 @@ class ModelAPI_Document; class ParametersPlugin_Parameter; class ParametersPlugin_PyInterp; -class PARAMETERSPLUGIN_EXPORT ParametersPlugin_EvalListener : public Events_Listener +class ParametersPlugin_EvalListener : public Events_Listener { public: - ParametersPlugin_EvalListener(); - virtual ~ParametersPlugin_EvalListener(); + PARAMETERSPLUGIN_EXPORT ParametersPlugin_EvalListener(); + PARAMETERSPLUGIN_EXPORT virtual ~ParametersPlugin_EvalListener(); - virtual void processEvent(const std::shared_ptr& theMessage); + PARAMETERSPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr& theMessage); protected: double evaluate(const std::string& theExpression, std::string& theError, diff --git a/src/ParametersPlugin/ParametersPlugin_Plugin.h b/src/ParametersPlugin/ParametersPlugin_Plugin.h index d4d35283f..280f00903 100644 --- a/src/ParametersPlugin/ParametersPlugin_Plugin.h +++ b/src/ParametersPlugin/ParametersPlugin_Plugin.h @@ -12,11 +12,11 @@ /**\class ParametersPlugin_Plugin * TODO: Add documentation */ -class PARAMETERSPLUGIN_EXPORT ParametersPlugin_Plugin : public ModelAPI_Plugin +class ParametersPlugin_Plugin : public ModelAPI_Plugin { public: /// Creates the feature object of this plugin by the feature string ID - virtual FeaturePtr createFeature(std::string theFeatureID); + PARAMETERSPLUGIN_EXPORT virtual FeaturePtr createFeature(std::string theFeatureID); public: ParametersPlugin_Plugin(); diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index 893b33fbf..84a0f9884 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -239,7 +239,9 @@ SketcherPrs_SymbolPrs::~SketcherPrs_SymbolPrs() aMgr->deleteConstraint(this); } - +#ifdef _WINDOWS +#pragma warning( disable : 4996 ) +#endif Handle(Image_AlienPixMap) SketcherPrs_SymbolPrs::icon() {