mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 18:20:27 +01:00
Remove potentially risky overloads of addConstraintToSubschema function
This commit is contained in:
parent
99e870ca5d
commit
32e89abcda
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user