From: spo Date: Thu, 6 Aug 2015 08:51:37 +0000 (+0300) Subject: Fix: gcc issue: default parameter value for a reference from a constructor X-Git-Tag: V_1.4.0_beta4~426 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb6603ce1d382f48f60c7c215d4293a068683894;p=modules%2Fshaper.git Fix: gcc issue: default parameter value for a reference from a constructor --- diff --git a/src/ModelAPI/ModelAPI_AttributeValidator.h b/src/ModelAPI/ModelAPI_AttributeValidator.h index 9ec8cb934..1cf46a54c 100644 --- a/src/ModelAPI/ModelAPI_AttributeValidator.h +++ b/src/ModelAPI/ModelAPI_AttributeValidator.h @@ -22,7 +22,7 @@ public: //! \param theArguments arguments of the attribute virtual bool isValid(const AttributePtr& theAttribute, const std::list& theArguments, - std::string& theError = std::string()) const = 0; + std::string& theError) const = 0; MODELAPI_EXPORT ~ModelAPI_AttributeValidator(); }; diff --git a/src/ModelAPI/ModelAPI_FeatureValidator.h b/src/ModelAPI/ModelAPI_FeatureValidator.h index 9b529e9db..6b83d30e8 100644 --- a/src/ModelAPI/ModelAPI_FeatureValidator.h +++ b/src/ModelAPI/ModelAPI_FeatureValidator.h @@ -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& theFeature, const std::list& 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; diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index b8b2fa53e..6e8b36b6b 100644 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -53,14 +53,16 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const AttributePtr& theAttribut dynamic_cast(aFactory->validator("GeomValidators_ShapeType")); std::list 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;