remove more 'using namespace' statements from headers
This commit is contained in:
parent
00fd416a99
commit
192d87cd24
@ -35,7 +35,6 @@
|
||||
|
||||
namespace epee
|
||||
{
|
||||
using namespace misc_utils::parse;
|
||||
namespace serialization
|
||||
{
|
||||
namespace json
|
||||
@ -91,7 +90,7 @@ namespace epee
|
||||
switch(*it)
|
||||
{
|
||||
case '"':
|
||||
match_string2(it, buf_end, name);
|
||||
misc_utils::parse::match_string2(it, buf_end, name);
|
||||
state = match_state_waiting_separator;
|
||||
break;
|
||||
case '}':
|
||||
@ -112,7 +111,7 @@ namespace epee
|
||||
if(*it == '"')
|
||||
{//just a named string value started
|
||||
std::string val;
|
||||
match_string2(it, buf_end, val);
|
||||
misc_utils::parse::match_string2(it, buf_end, val);
|
||||
//insert text value
|
||||
stg.set_value(name, std::move(val), current_section);
|
||||
state = match_state_wonder_after_value;
|
||||
@ -120,7 +119,7 @@ namespace epee
|
||||
{//just a named number value started
|
||||
boost::string_ref val;
|
||||
bool is_v_float = false;bool is_signed = false;
|
||||
match_number2(it, buf_end, val, is_v_float, is_signed);
|
||||
misc_utils::parse::match_number2(it, buf_end, val, is_v_float, is_signed);
|
||||
if(!is_v_float)
|
||||
{
|
||||
if(is_signed)
|
||||
@ -147,7 +146,7 @@ namespace epee
|
||||
}else if(isalpha(*it) )
|
||||
{// could be null, true or false
|
||||
boost::string_ref word;
|
||||
match_word2(it, buf_end, word);
|
||||
misc_utils::parse::match_word2(it, buf_end, word);
|
||||
if(boost::iequals(word, "null"))
|
||||
{
|
||||
state = match_state_wonder_after_value;
|
||||
@ -202,7 +201,7 @@ namespace epee
|
||||
{
|
||||
//mean array of strings
|
||||
std::string val;
|
||||
match_string2(it, buf_end, val);
|
||||
misc_utils::parse::match_string2(it, buf_end, val);
|
||||
h_array = stg.insert_first_value(name, std::move(val), current_section);
|
||||
CHECK_AND_ASSERT_THROW_MES(h_array, " failed to insert values entry");
|
||||
state = match_state_array_after_value;
|
||||
@ -211,7 +210,7 @@ namespace epee
|
||||
{//array of numbers value started
|
||||
boost::string_ref val;
|
||||
bool is_v_float = false;bool is_signed_val = false;
|
||||
match_number2(it, buf_end, val, is_v_float, is_signed_val);
|
||||
misc_utils::parse::match_number2(it, buf_end, val, is_v_float, is_signed_val);
|
||||
if(!is_v_float)
|
||||
{
|
||||
if (is_signed_val)
|
||||
@ -246,7 +245,7 @@ namespace epee
|
||||
}else if(isalpha(*it) )
|
||||
{// array of booleans
|
||||
boost::string_ref word;
|
||||
match_word2(it, buf_end, word);
|
||||
misc_utils::parse::match_word2(it, buf_end, word);
|
||||
if(boost::iequals(word, "true"))
|
||||
{
|
||||
h_array = stg.insert_first_value(name, true, current_section);
|
||||
@ -290,7 +289,7 @@ namespace epee
|
||||
if(*it == '"')
|
||||
{
|
||||
std::string val;
|
||||
match_string2(it, buf_end, val);
|
||||
misc_utils::parse::match_string2(it, buf_end, val);
|
||||
bool res = stg.insert_next_value(h_array, std::move(val));
|
||||
CHECK_AND_ASSERT_THROW_MES(res, "failed to insert values");
|
||||
state = match_state_array_after_value;
|
||||
@ -301,7 +300,7 @@ namespace epee
|
||||
{//array of numbers value started
|
||||
boost::string_ref val;
|
||||
bool is_v_float = false;bool is_signed_val = false;
|
||||
match_number2(it, buf_end, val, is_v_float, is_signed_val);
|
||||
misc_utils::parse::match_number2(it, buf_end, val, is_v_float, is_signed_val);
|
||||
bool insert_res = false;
|
||||
if(!is_v_float)
|
||||
{
|
||||
@ -334,7 +333,7 @@ namespace epee
|
||||
if(isalpha(*it) )
|
||||
{// array of booleans
|
||||
boost::string_ref word;
|
||||
match_word2(it, buf_end, word);
|
||||
misc_utils::parse::match_word2(it, buf_end, word);
|
||||
if(boost::iequals(word, "true"))
|
||||
{
|
||||
bool r = stg.insert_next_value(h_array, true);
|
||||
|
@ -38,6 +38,7 @@
|
||||
#define MONERO_DEFAULT_LOG_CATEGORY "bcutil"
|
||||
|
||||
namespace po = boost::program_options;
|
||||
using namespace cryptonote;
|
||||
using namespace epee;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
@ -50,10 +50,6 @@
|
||||
|
||||
#include "blockchain_utilities.h"
|
||||
|
||||
|
||||
using namespace cryptonote;
|
||||
|
||||
|
||||
class BlocksdatFile
|
||||
{
|
||||
public:
|
||||
@ -63,7 +59,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
Blockchain* m_blockchain_storage;
|
||||
cryptonote::Blockchain* m_blockchain_storage;
|
||||
|
||||
std::ofstream * m_raw_data_file;
|
||||
|
||||
|
@ -48,10 +48,6 @@
|
||||
|
||||
#include "blockchain_utilities.h"
|
||||
|
||||
|
||||
using namespace cryptonote;
|
||||
|
||||
|
||||
class BootstrapFile
|
||||
{
|
||||
public:
|
||||
@ -66,9 +62,9 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
Blockchain* m_blockchain_storage;
|
||||
cryptonote::Blockchain* m_blockchain_storage;
|
||||
|
||||
tx_memory_pool* m_tx_pool;
|
||||
cryptonote::tx_memory_pool* m_tx_pool;
|
||||
typedef std::vector<char> buffer_type;
|
||||
std::ofstream * m_raw_data_file;
|
||||
buffer_type m_buffer;
|
||||
@ -78,7 +74,7 @@ protected:
|
||||
bool open_writer(const boost::filesystem::path& file_path, uint64_t start_block, uint64_t stop_block);
|
||||
bool initialize_file(uint64_t start_block, uint64_t stop_block);
|
||||
bool close();
|
||||
void write_block(block& block);
|
||||
void write_block(cryptonote::block& block);
|
||||
void flush_chunk();
|
||||
|
||||
private:
|
||||
|
@ -1167,13 +1167,6 @@ namespace cryptonote
|
||||
m_sync_download_objects_size += size;
|
||||
MDEBUG(context << " downloaded " << size << " bytes worth of blocks");
|
||||
|
||||
/*using namespace boost::chrono;
|
||||
auto point = steady_clock::now();
|
||||
auto time_from_epoh = point.time_since_epoch();
|
||||
auto sec = duration_cast< seconds >( time_from_epoh ).count();*/
|
||||
|
||||
//epee::net_utils::network_throttle_manager::get_global_throttle_inreq().logger_handle_net("log/dr-monero/net/req-all.data", sec, get_avg_block_size());
|
||||
|
||||
if(arg.blocks.empty())
|
||||
{
|
||||
LOG_ERROR_CCONTEXT("sent wrong NOTIFY_HAVE_OBJECTS: no blocks");
|
||||
|
Loading…
Reference in New Issue
Block a user