From d6871c3f153490fa956cdc73e0bf5dcaf800c2c3 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Tue, 5 May 2015 21:43:27 +0800 Subject: [PATCH] Fix warnings --- include/rapidjson/schema.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()) {