Salome HOME
Fix: gcc issue: default parameter value for a reference from a constructor
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 6 Aug 2015 08:51:37 +0000 (11:51 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 6 Aug 2015 08:53:13 +0000 (11:53 +0300)
src/ModelAPI/ModelAPI_AttributeValidator.h
src/ModelAPI/ModelAPI_FeatureValidator.h
src/SketchPlugin/SketchPlugin_Validators.cpp

index 9ec8cb9349969f3c7b2d2c93b637994378c0e27a..1cf46a54cde7b10ccb2e8feb1586ee165d223138 100644 (file)
@@ -22,7 +22,7 @@ public:
   //! \param theArguments arguments of the attribute
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError = std::string()) const = 0;
+                       std::string& theError) const = 0;
 
   MODELAPI_EXPORT ~ModelAPI_AttributeValidator();
 };
index 9b529e9db9567d3e0e4ad423555fe6b5037a79d0..6b83d30e8edde7909dd53e6a0998855d315b0ecb 100644 (file)
@@ -31,7 +31,7 @@ class MODELAPI_EXPORT ModelAPI_FeatureValidator : public ModelAPI_Validator
   /// \param theArguments list of string, feature attribute names: dependent attributes
   virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                        const std::list<std::string>& theArguments,
-                       std::string& theError = std::string()) const = 0;
+                       std::string& theError) const = 0;
 
   /// Returns true if the attribute in feature is not obligatory for the feature execution
   virtual bool isNotObligatory(std::string theFeature, std::string theAttribute) = 0;
index b8b2fa53e498be217bd9f10fb550ea393caa5aca..6e8b36b6bd546a7eb2c734a7dea7904a3ed4b626 100644 (file)
@@ -53,14 +53,16 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const AttributePtr& theAttribut
       dynamic_cast<const GeomValidators_ShapeType*>(aFactory->validator("GeomValidators_ShapeType"));
     std::list<std::string> anArguments;
     anArguments.push_back("circle");
-    bool aShapeValid = aShapeValidator->isValid(aRefAttr, anArguments);
+    std::string aCircleError;
+    bool aShapeValid = aShapeValidator->isValid(aRefAttr, anArguments, aCircleError);
     // the circle line is not a valid case
     if (aShapeValid)
       return false;
       
     anArguments.clear();
     anArguments.push_back("line");
-    aShapeValid = aShapeValidator->isValid(aRefAttr, anArguments);
+    std::string aLineError;
+    aShapeValid = aShapeValidator->isValid(aRefAttr, anArguments, aLineError);
     // if the attribute value is not a line, that means it is a vertex. A vertex is always valid
     if (!aShapeValid)
       return true;