diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 7ca9d2e..d5d9452 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -86,6 +86,7 @@ public: template class ISchemaValidatorFactory { public: + virtual ~ISchemaValidatorFactory() {} virtual ISchemaValidator* CreateSchemaValidator(const BaseSchema& root) = 0; }; @@ -309,7 +310,8 @@ public: typedef SchemaValidationContext Context; template - MultiTypeSchema(const ValueType& value, const ValueType& type) : BaseSchema(), typedSchemas_() { + MultiTypeSchema(const ValueType& value, const ValueType& type) : BaseSchema() { + std::memset(typedSchemas_, 0, sizeof(typedSchemas_)); RAPIDJSON_ASSERT(type.IsArray()); for (typename ValueType::ConstValueIterator itr = type.Begin(); itr != type.End(); ++itr) { if (itr->IsString()) {