mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-14 23:07:55 +02:00
Got rid of several unnecessary includes of <iostream>.
Including <iostream> causes the file to be polluted with a static initializer for the __ioinit symbol. This can harm binary startup time. For more info, see here: http://neugierig.org/software/chromium/notes/2011/08/static-initializers.html
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
||||
@@ -904,7 +903,14 @@ std::istream& operator>>( std::istream &sin, Value &root )
|
||||
{
|
||||
Json::Reader reader;
|
||||
bool ok = reader.parse(sin, root, true);
|
||||
if (!ok) JSON_FAIL_MESSAGE(reader.getFormattedErrorMessages());
|
||||
if (!ok) {
|
||||
fprintf(
|
||||
stderr,
|
||||
"Error from reader: %s",
|
||||
reader.getFormattedErrorMessages().c_str());
|
||||
|
||||
JSON_FAIL_MESSAGE("reader error");
|
||||
}
|
||||
return sin;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,6 @@
|
||||
# endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
#endif // if !defined(JSON_IS_AMALGAMATION)
|
||||
#include <math.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
|
@@ -11,7 +11,6 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
|
Reference in New Issue
Block a user