Remove potentially risky overloads of addConstraintToSubschema function

This commit is contained in:
Tristan Penman 2016-04-07 09:56:24 +10:00
parent 99e870ca5d
commit 32e89abcda

View File

@ -81,47 +81,6 @@ public:
mutableSubschema(subschema)->addConstraint(constraint);
}
/**
* @brief move a constraint to a specific sub-schema
*
* @param constraint reference to a constraint that will be copied into
* the sub-schema
* @param subschema pointer to the sub-schema that will own the copied
* constraint
*
* @throws std::runtime_error if the sub-schema is not owned by this Schema
* instance
*/
void addConstraintToSubschema(Constraint* constraint,
const Subschema *subschema)
{
// TODO: Check heirarchy for subschemas that do not belong...
mutableSubschema(subschema)->addConstraint(constraint);
}
//#if _cplusplus >=201103L
#if 0
/**
* @brief Copy a constraint to a specific sub-schema
* exception safe.
*
* @param constraint reference to a constraint that will be copied into
* the sub-schema
* @param subschema pointer to the sub-schema that will own the copied
* constraint
*
* @throws std::runtime_error if the sub-schema is not owned by this Schema
* instance
*/
void addConstraintToSubschema(std::unique_ptr<Constraint> constraint,
const Subschema *subschema)
{
// TODO: Check heirarchy for subschemas that do not belong...
mutableSubschema(subschema)->addConstraint(std::move(constraint));
}
#endif
/**
* @brief Create a new Subschema instance that is owned by this Schema
*