Merge pull request #274 from pah/fixes/273
tutorial.cpp: fix insitu parsing (closes #273)
This commit is contained in:
commit
362221d3ca
@ -24,12 +24,10 @@ int main(int, char*[]) {
|
||||
return 1;
|
||||
#else
|
||||
// In-situ parsing, decode strings directly in the source string. Source must be string.
|
||||
{
|
||||
char buffer[sizeof(json)];
|
||||
memcpy(buffer, json, sizeof(json));
|
||||
if (document.ParseInsitu(buffer).HasParseError())
|
||||
return 1;
|
||||
}
|
||||
char buffer[sizeof(json)];
|
||||
memcpy(buffer, json, sizeof(json));
|
||||
if (document.ParseInsitu(buffer).HasParseError())
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
printf("\nParsing to document succeeded.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user