Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include missing key value in assert message #6

Open
wants to merge 3 commits into
base: mujin
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

10 changes: 9 additions & 1 deletion include/rapidjson/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,15 @@ class GenericValue {
if (member != MemberEnd())
return member->value;
else {
RAPIDJSON_ASSERT(false); // see above note
#ifdef RAPIDJSON_ASSERT_MSG
static const char* const ASSERT_MESSAGE = "cannot find member '%s'";
const size_t assertBufferSize = strlen(ASSERT_MESSAGE) + name.GetStringLength() + 1;
char assertBuffer[assertBufferSize];
snprintf(assertBuffer, assertBufferSize, ASSERT_MESSAGE, name.GetString());
RAPIDJSON_ASSERT_MSG(false, assertBuffer); // see above note
#else
RAPIDJSON_ASSERT(false); // see above note
#endif

// This will generate -Wexit-time-destructors in clang
// static GenericValue NullValue;
Expand Down
1 change: 0 additions & 1 deletion thirdparty/gtest
Submodule gtest deleted from 0a4396