-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bug in writing #5
Comments
The line mentioned in your stackoverflow post ( In general, MS Visual C++ warning C4800 is a false positive in almost all cases. It just tells you that an integer is converted to a boolean value ( |
Thank you Philip, there are two lines with the same warning: case kObjectType: m->name.flags_ & kCopyFlag); And this one: case kStringType: Do you suggest should I change the document.h with the latest one on this git? Edit: rapidjson\include\rapidjson\document.h on this master repo is the same I'm using and the warning is right at line 553 and line 567. Did you mean about another master? |
Sorry, I had a local clone (on another machine) that was not up-to-date with |
Philip,
to this:
without success. Zapp 2014-04-13 9:17 GMT+02:00 Philipp A. Hartmann notifications@github.com:
Website Zapmobilegames http://www.zapmobilegames.com |
Can you test, whether changing the expressions
to
silences the warning? According to the MSDN, this should fix it, |
You got it! Nice one! :) Zapp 2014-04-13 10:45 GMT+02:00 Philipp A. Hartmann notifications@github.com:
Website Zapmobilegames http://www.zapmobilegames.com |
Instead of always just shallowly referencing the potentially allocated strings when calling the Handler::String function, request a copy in case the string has been allocated from an Allocator before. This is necessary to avoid double free()s of the string memory, especially when using the Handler to create a deep copy of a Value. The explicit comparison against '0' is done to suppress the warning C4800 on MSVC, see pah/rapidjson#5.
Instead of always just shallowly referencing the potentially allocated strings when calling the Handler::String function, request a copy in case the string has been allocated from an Allocator before. This is necessary to avoid double free()s of the string memory, especially when using the Handler to create a deep copy of a Value. The explicit comparison against '0' is done to suppress the warning C4800 on MSVC, see pah/rapidjson#5.
Hello,
this is the warning I got using your release (never seen on the old official release 0.11):
http://stackoverflow.com/questions/23016836/rapidjson-fix-a-bug-in-writing
The text was updated successfully, but these errors were encountered: