Added overloaded functions for default parseFlags

Can write d.Parse(...) instead of d.Parse<0>(...)
Hope to reduce strangeness and confusion for beginner.
This commit is contained in:
Milo Yip
2014-06-29 15:03:38 +08:00
parent 6f306755d5
commit 1d14748bc9
9 changed files with 34 additions and 16 deletions

View File

@@ -42,7 +42,7 @@ TEST(JsonChecker, Reader) {
}
GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
if (!document.Parse<0>((const char*)json).HasParseError())
if (!document.Parse((const char*)json).HasParseError())
FAIL();
//printf("%s(%u):%s\n", filename, (unsigned)document.GetErrorOffset(), document.GetParseError());
free(json);
@@ -63,7 +63,7 @@ TEST(JsonChecker, Reader) {
}
GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
document.Parse<0>((const char*)json);
document.Parse((const char*)json);
EXPECT_TRUE(!document.HasParseError());
free(json);
}