mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
fixed #304
This commit is contained in:
@ -10116,7 +10116,7 @@ basic_json_parser_63:
|
|||||||
json_pointer top_pointer = ptr.top();
|
json_pointer top_pointer = ptr.top();
|
||||||
if (top_pointer != ptr)
|
if (top_pointer != ptr)
|
||||||
{
|
{
|
||||||
basic_json& x = result.at(top_pointer);
|
result.at(top_pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get reference to parent of JSON pointer ptr
|
// get reference to parent of JSON pointer ptr
|
||||||
|
@ -9413,7 +9413,7 @@ class basic_json
|
|||||||
json_pointer top_pointer = ptr.top();
|
json_pointer top_pointer = ptr.top();
|
||||||
if (top_pointer != ptr)
|
if (top_pointer != ptr)
|
||||||
{
|
{
|
||||||
basic_json& x = result.at(top_pointer);
|
result.at(top_pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// get reference to parent of JSON pointer ptr
|
// get reference to parent of JSON pointer ptr
|
||||||
|
@ -443,6 +443,15 @@ TEST_CASE("regression tests")
|
|||||||
CHECK(at_integer == val_integer);
|
CHECK(at_integer == val_integer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SECTION("issue #304 - Unused variable warning")
|
||||||
|
{
|
||||||
|
// code triggered a "warning: unused variable" warning and is left
|
||||||
|
// here to avoid the warning in the future
|
||||||
|
json object;
|
||||||
|
json patch = json::array();
|
||||||
|
object = object.patch(patch);
|
||||||
|
}
|
||||||
|
|
||||||
SECTION("issue #306 - Parsing fails without space at end of file")
|
SECTION("issue #306 - Parsing fails without space at end of file")
|
||||||
{
|
{
|
||||||
for (auto filename :
|
for (auto filename :
|
||||||
|
Reference in New Issue
Block a user