Merge pull request #407 from DavidSM64/release

Added detail namespace to prevent json namespace conflicts
This commit is contained in:
Syoyo Fujita 2023-02-19 02:08:19 +09:00 committed by GitHub
commit 84a83d39f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 683 additions and 681 deletions

View File

@ -16,10 +16,10 @@
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
static JsonDocument JsonConstruct(const char* str) static tinygltf::detail::JsonDocument JsonConstruct(const char* str)
{ {
JsonDocument doc; tinygltf::detail::JsonDocument doc;
JsonParse(doc, str, strlen(str)); tinygltf::detail::JsonParse(doc, str, strlen(str));
return doc; return doc;
} }
@ -275,9 +275,9 @@ TEST_CASE("parse-integer", "[bounds-checking]") {
err.clear(); err.clear();
{ {
JsonDocument o; tinygltf::detail::JsonDocument o;
double nan = std::numeric_limits<double>::quiet_NaN(); double nan = std::numeric_limits<double>::quiet_NaN();
tinygltf::JsonAddMember(o, "int", json(nan)); tinygltf::detail::JsonAddMember(o, "int", tinygltf::detail::json(nan));
CHECK_FALSE(tinygltf::ParseIntegerProperty( CHECK_FALSE(tinygltf::ParseIntegerProperty(
&result, &err, o, &result, &err, o,
"int", true)); "int", true));
@ -321,9 +321,9 @@ TEST_CASE("parse-unsigned", "[bounds-checking]") {
err.clear(); err.clear();
{ {
JsonDocument o; tinygltf::detail::JsonDocument o;
double nan = std::numeric_limits<double>::quiet_NaN(); double nan = std::numeric_limits<double>::quiet_NaN();
tinygltf::JsonAddMember(o, "int", json(nan)); tinygltf::detail::JsonAddMember(o, "int", tinygltf::detail::json(nan));
CHECK_FALSE(tinygltf::ParseUnsignedProperty( CHECK_FALSE(tinygltf::ParseUnsignedProperty(
&result, &err, o, &result, &err, o,
"int", true)); "int", true));

File diff suppressed because it is too large Load Diff