diff --git a/gen/gen.cpp b/gen/gen.cpp index b8a6c73..ca5b470 100644 --- a/gen/gen.cpp +++ b/gen/gen.cpp @@ -8,9 +8,11 @@ // $ ./gen > univalue_escapes.h // -#include -#include -#include "univalue.h" +#include + +#include +#include +#include static bool initEscapes; static std::string escapes[256]; diff --git a/include/univalue.h b/include/univalue.h index fc5cf40..2db7484 100644 --- a/include/univalue.h +++ b/include/univalue.h @@ -6,13 +6,11 @@ #ifndef __UNIVALUE_H__ #define __UNIVALUE_H__ -#include -#include - +#include +#include +#include #include #include -#include -#include class UniValue { public: diff --git a/lib/univalue.cpp b/lib/univalue.cpp index c4e59fa..3553995 100644 --- a/lib/univalue.cpp +++ b/lib/univalue.cpp @@ -3,12 +3,15 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/licenses/mit-license.php. -#include +#include + #include +#include +#include #include -#include - -#include "univalue.h" +#include +#include +#include const UniValue NullUniValue; diff --git a/lib/univalue_get.cpp b/lib/univalue_get.cpp index 5af89a3..c862cc7 100644 --- a/lib/univalue_get.cpp +++ b/lib/univalue_get.cpp @@ -3,17 +3,18 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/licenses/mit-license.php. -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include #include -#include +#include #include - -#include "univalue.h" +#include +#include +#include namespace { diff --git a/lib/univalue_read.cpp b/lib/univalue_read.cpp index be39bfe..a6ed75e 100644 --- a/lib/univalue_read.cpp +++ b/lib/univalue_read.cpp @@ -2,19 +2,22 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/licenses/mit-license.php. -#include -#include -#include -#include "univalue.h" +#include #include "univalue_utffilter.h" +#include +#include +#include +#include +#include + /* * According to stackexchange, the original json test suite wanted * to limit depth to 22. Widely-deployed PHP bails at depth 512, * so we will follow PHP's lead, which should be more than sufficient * (further stackexchange comments indicate depth > 32 rarely occurs). */ -static const size_t MAX_JSON_DEPTH = 512; +static constexpr size_t MAX_JSON_DEPTH = 512; static bool json_isdigit(int ch) { diff --git a/lib/univalue_write.cpp b/lib/univalue_write.cpp index 3a2c580..1883307 100644 --- a/lib/univalue_write.cpp +++ b/lib/univalue_write.cpp @@ -2,11 +2,13 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/licenses/mit-license.php. -#include -#include -#include "univalue.h" +#include #include "univalue_escapes.h" +#include +#include +#include + static std::string json_escape(const std::string& inS) { std::string outS; diff --git a/test/no_nul.cpp b/test/no_nul.cpp index 83d2922..3a7a727 100644 --- a/test/no_nul.cpp +++ b/test/no_nul.cpp @@ -1,4 +1,4 @@ -#include "univalue.h" +#include int main (int argc, char *argv[]) { diff --git a/test/object.cpp b/test/object.cpp index c2f52f8..b9697a8 100644 --- a/test/object.cpp +++ b/test/object.cpp @@ -3,13 +3,15 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/licenses/mit-license.php. -#include -#include -#include -#include +#include + #include +#include +#include +#include #include -#include +#include +#include #define BOOST_FIXTURE_TEST_SUITE(a, b) #define BOOST_AUTO_TEST_CASE(funcName) void funcName() diff --git a/test/test_json.cpp b/test/test_json.cpp index 2943bae..f8c1023 100644 --- a/test/test_json.cpp +++ b/test/test_json.cpp @@ -4,9 +4,11 @@ // It reads JSON input from stdin and exits with code 0 if it can be parsed // successfully. It also pretty prints the parsed JSON value to stdout. +#include + #include +#include #include -#include "univalue.h" using namespace std; diff --git a/test/unitester.cpp b/test/unitester.cpp index 02e1a83..81b1c5d 100644 --- a/test/unitester.cpp +++ b/test/unitester.cpp @@ -2,12 +2,11 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or https://opensource.org/licenses/mit-license.php. -#include -#include -#include +#include + #include +#include #include -#include "univalue.h" #ifndef JSON_TEST_SRC #error JSON_TEST_SRC must point to test source directory