Skip to content

Commit ee1884d

Browse files
author
Richard Fric
committed
Remove unused class
1 parent 99ba136 commit ee1884d

File tree

7 files changed

+21
-325
lines changed

7 files changed

+21
-325
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ set( fc_sources
9898
src/utf8.cpp
9999
src/io/iostream.cpp
100100
src/io/datastream.cpp
101-
src/io/buffered_iostream.cpp
102101
src/io/fstream.cpp
103102
src/io/sstream.cpp
104103
src/io/json.cpp

include/fc/io/buffered_iostream.hpp

Lines changed: 0 additions & 73 deletions
This file was deleted.

include/fc/io/json.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ namespace fc
3333
static ostream& to_stream( ostream& out, const variants& v, output_formatting format = stringify_large_ints_and_doubles );
3434
static ostream& to_stream( ostream& out, const variant_object& v, output_formatting format = stringify_large_ints_and_doubles );
3535

36-
static variant from_stream( buffered_istream& in, parse_type ptype = legacy_parser );
37-
3836
static variant from_string( const std::string& utf8_str, parse_type ptype = legacy_parser );
3937
static variants variants_from_string( const std::string& utf8_str, parse_type ptype = legacy_parser );
4038
static std::string to_string( const variant& v, output_formatting format = stringify_large_ints_and_doubles );
@@ -58,22 +56,22 @@ namespace fc
5856
}
5957

6058
template<typename T>
61-
static std::string to_string( const T& v, output_formatting format = stringify_large_ints_and_doubles )
59+
static std::string to_string( const T& v, output_formatting format = stringify_large_ints_and_doubles )
6260
{
6361
return to_string( variant(v), format );
6462
}
6563

6664
template<typename T>
67-
static std::string to_pretty_string( const T& v, output_formatting format = stringify_large_ints_and_doubles )
65+
static std::string to_pretty_string( const T& v, output_formatting format = stringify_large_ints_and_doubles )
6866
{
6967
return to_pretty_string( variant(v), format );
7068
}
7169

7270
template<typename T>
73-
static void save_to_file( const T& v, const std::string& p, bool pretty = true, output_formatting format = stringify_large_ints_and_doubles )
71+
static void save_to_file( const T& v, const std::string& p, bool pretty = true, output_formatting format = stringify_large_ints_and_doubles )
7472
{
7573
save_to_file( variant(v), boost::filesystem::path(p), pretty );
76-
}
74+
}
7775
};
7876

7977
} // fc

include/fc/io/json_relaxed.hpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <fc/io/json.hpp>
77
#include <fc/exception.hpp>
88
#include <fc/io/iostream.hpp>
9-
#include <fc/io/buffered_iostream.hpp>
109
#include <fc/io/fstream.hpp>
1110
#include <fc/io/sstream.hpp>
1211
#include <fc/log/logger.hpp>
@@ -113,7 +112,7 @@ namespace fc { namespace json_relaxed
113112
else
114113
{
115114
in.get();
116-
115+
117116
while( true )
118117
{
119118
char c = in.peek();
@@ -148,7 +147,7 @@ namespace fc { namespace json_relaxed
148147
}
149148
}
150149
}
151-
150+
152151
while( true )
153152
{
154153
char c = in.peek();
@@ -172,7 +171,7 @@ namespace fc { namespace json_relaxed
172171
token << c;
173172
}
174173
}
175-
174+
176175
} FC_RETHROW_EXCEPTIONS( warn, "while parsing token '${token}'",
177176
("token", token.str() ) );
178177
}
@@ -231,7 +230,7 @@ namespace fc { namespace json_relaxed
231230

232231
} FC_RETHROW_EXCEPTIONS( warn, "while parsing string" );
233232
}
234-
233+
235234
struct CharValueTable
236235
{
237236
public:
@@ -277,25 +276,25 @@ namespace fc { namespace json_relaxed
277276
c2v[(unsigned char)'z'] = c2v[(unsigned char)'Z'] = 35;
278277
return;
279278
}
280-
279+
281280
uint8_t operator[]( char index ) const { return c2v[index & 0xFF]; }
282-
281+
283282
uint8_t c2v[0x100];
284283
};
285-
284+
286285
template<uint8_t base>
287286
fc::variant parseInt( const std::string& token, size_t start )
288287
{
289288
static const CharValueTable ctbl;
290289
static const uint64_t INT64_MAX_PLUS_ONE = static_cast<uint64_t>(INT64_MAX) + 1;
291-
290+
292291
size_t i = start, n = token.length();
293292
if( i >= n )
294293
FC_THROW_EXCEPTION( parse_error_exception, "zero-length integer" );
295-
294+
296295
uint64_t val = 0;
297296
uint64_t maxb4mul = UINT64_MAX / base;
298-
297+
299298
while(true)
300299
{
301300
char c = token[i];
@@ -344,7 +343,7 @@ namespace fc { namespace json_relaxed
344343
template<bool strict>
345344
fc::variant parseNumberOrStr( const std::string& token )
346345
{ try {
347-
//ilog( (token) );
346+
//ilog( (token) );
348347
size_t i = 0, n = token.length();
349348
if( n == 0 )
350349
FC_THROW_EXCEPTION( parse_error_exception, "expected: non-empty token, got: empty token" );
@@ -652,12 +651,12 @@ namespace fc { namespace json_relaxed
652651
FC_THROW_EXCEPTION( parse_error_exception, "expected: number" );
653652
return result;
654653
} FC_RETHROW() }
655-
654+
656655
template<typename T, bool strict>
657656
variant wordFromStream( T& in )
658657
{
659658
std::string token = tokenFromStream(in);
660-
659+
661660
FC_ASSERT( token.length() > 0 );
662661

663662
switch( token[0] )
@@ -683,7 +682,7 @@ namespace fc { namespace json_relaxed
683682

684683
FC_THROW_EXCEPTION( parse_error_exception, "expected: null|true|false" );
685684
}
686-
685+
687686
template<typename T, bool strict>
688687
variant variant_from_stream( T& in )
689688
{

include/fc/rpc/cli.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22
#include <fc/io/stdio.hpp>
33
#include <fc/io/json.hpp>
4-
#include <fc/io/buffered_iostream.hpp>
54
#include <fc/io/sstream.hpp>
65
#include <fc/rpc/api_connection.hpp>
76
#include <fc/thread/thread.hpp>
@@ -44,4 +43,4 @@ namespace fc { namespace rpc {
4443
std::string command_file;
4544
bool non_interactive = false;
4645
};
47-
} }
46+
} }

0 commit comments

Comments
 (0)