From 32e89abcdadb7a783cf73992a580dcf587d197d7 Mon Sep 17 00:00:00 2001 From: Tristan Penman Date: Thu, 7 Apr 2016 09:56:24 +1000 Subject: [PATCH] Remove potentially risky overloads of addConstraintToSubschema function --- include/valijson/schema.hpp | 41 ------------------------------------- 1 file changed, 41 deletions(-) diff --git a/include/valijson/schema.hpp b/include/valijson/schema.hpp index cbd52a9..2308e36 100644 --- a/include/valijson/schema.hpp +++ b/include/valijson/schema.hpp @@ -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, - 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 *