Ver código fonte

refactor: remove deprecated type chain in Validator

Sam Jaffe 1 ano atrás
pai
commit
49858d9e32
1 arquivos alterados com 4 adições e 6 exclusões
  1. 4 6
      include/jvalidate/validator.h

+ 4 - 6
include/jvalidate/validator.h

@@ -19,15 +19,13 @@ public:
 }
 
 namespace jvalidate {
-template <template <Adapter, RegexEngine> class ValidationVisitor,
-          RegexEngine RE = detail::StdRegexEngine>
-class ExtendedValidator {
+template <RegexEngine RE = detail::StdRegexEngine> class ValidatorT {
 private:
   schema::Node const & schema_;
   std::unordered_map<std::string, RE> regex_cache_;
 
 public:
-  ExtendedValidator(schema::Node const & schema) : schema_(schema) {}
+  ValidatorT(schema::Node const & schema) : schema_(schema) {}
 
   template <Adapter A>
   Status validate(A const & json, ValidationResult const * result = nullptr) const {
@@ -35,8 +33,8 @@ public:
   }
 };
 
-class Validator : public ExtendedValidator<ValidationVisitor> {
+class Validator : public ValidatorT<> {
 public:
-  using Validator::ExtendedValidator::ExtendedValidator;
+  using Validator::ValidatorT::ValidatorT;
 };
 }