mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 06:55:50 +00:00
Clean up ripple_json module and remove unnecessary includes
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
|
||||
# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
|
||||
|
||||
# include <stdlib.h>
|
||||
# include <assert.h>
|
||||
|
||||
# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
|
||||
|
||||
namespace Json {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
|
||||
#define CPPTL_JSON_FEATURES_H_INCLUDED
|
||||
|
||||
#include "json_forwards.h"
|
||||
|
||||
namespace Json {
|
||||
|
||||
/** \brief Configuration passed to reader and writer.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#ifndef JSON_FORWARDS_H_INCLUDED
|
||||
# define JSON_FORWARDS_H_INCLUDED
|
||||
|
||||
# include "json_config.h"
|
||||
#define JSON_FORWARDS_H_INCLUDED
|
||||
|
||||
namespace Json {
|
||||
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
|
||||
#include "json_reader.h"
|
||||
#include "json_value.h"
|
||||
|
||||
#include <utility>
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
||||
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
||||
#endif
|
||||
|
||||
namespace Json {
|
||||
|
||||
// Implementation of class Features
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
#ifndef CPPTL_JSON_READER_H_INCLUDED
|
||||
# define CPPTL_JSON_READER_H_INCLUDED
|
||||
|
||||
#include "json_features.h"
|
||||
#include "json_value.h"
|
||||
|
||||
#include <deque>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace Json {
|
||||
|
||||
/** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
|
||||
|
||||
@@ -1,24 +1,3 @@
|
||||
#include <iostream>
|
||||
#include "json_value.h"
|
||||
#include "json_writer.h"
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/conststring.h>
|
||||
#endif
|
||||
#include <cstddef> // size_t
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
# include "json_batchallocator.h"
|
||||
#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
|
||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
|
||||
|
||||
namespace Json {
|
||||
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
#ifndef CPPTL_JSON_H_INCLUDED
|
||||
# define CPPTL_JSON_H_INCLUDED
|
||||
|
||||
#include "json_forwards.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifndef JSON_USE_CPPTL_SMALLMAP
|
||||
# include <map>
|
||||
#else
|
||||
# include <cpptl/smallmap.h>
|
||||
#endif
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/forwards.h>
|
||||
#endif
|
||||
|
||||
/** \brief JSON (JavaScript Object Notation).
|
||||
*/
|
||||
namespace Json {
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
#include <utility>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include "json_writer.h"
|
||||
|
||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
||||
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
||||
#endif
|
||||
|
||||
namespace Json {
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
#ifndef JSON_WRITER_H_INCLUDED
|
||||
# define JSON_WRITER_H_INCLUDED
|
||||
|
||||
# include "json_value.h"
|
||||
|
||||
# include <vector>
|
||||
# include <string>
|
||||
# include <iostream>
|
||||
|
||||
namespace Json {
|
||||
|
||||
class Value;
|
||||
|
||||
@@ -24,6 +24,38 @@
|
||||
|
||||
#include "ripple_json.h"
|
||||
|
||||
// VFALCO: TODO Remove unneeded includes
|
||||
#include <cstddef>
|
||||
//#include <cstdio>
|
||||
//#include <cstring>
|
||||
#include <iomanip>
|
||||
//#include <iostream>
|
||||
//#include <sstream>
|
||||
//#include <stdexcept>
|
||||
//#include <stdio.h>
|
||||
//#include <string.h>
|
||||
//#include <utility>
|
||||
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/conststring.h>
|
||||
#endif
|
||||
|
||||
// VFALCO: TODO, eliminate this boost dependency
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
#include "json/json_batchallocator.h"
|
||||
#endif
|
||||
|
||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
|
||||
|
||||
//#if _MSC_VER >= 1400 // VC++ 8.0
|
||||
//#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
|
||||
//#endif
|
||||
|
||||
#include "json/json_reader.cpp"
|
||||
#include "json/json_value.cpp"
|
||||
#include "json/json_writer.cpp"
|
||||
|
||||
|
||||
@@ -32,8 +32,31 @@
|
||||
#ifndef RIPPLE_JSON_H
|
||||
#define RIPPLE_JSON_H
|
||||
|
||||
// VFALCO: TODO Remove unneeded includes
|
||||
#include <cassert>
|
||||
//#include <cstdlib>
|
||||
#include <deque>
|
||||
//#include <iostream>
|
||||
#include <stack>
|
||||
//#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Needed before these cpptl includes
|
||||
#include "json/json_config.h"
|
||||
|
||||
#ifndef JSON_USE_CPPTL_SMALLMAP
|
||||
# include <map>
|
||||
#else
|
||||
# include <cpptl/smallmap.h>
|
||||
#endif
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/forwards.h>
|
||||
#endif
|
||||
|
||||
#include "json/json_forwards.h"
|
||||
#include "json/json_features.h"
|
||||
#include "json/json_value.h"
|
||||
#include "json/json_reader.h"
|
||||
#include "json/json_writer.h"
|
||||
#include "json/json_value.h"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user