Remove using-namespace-directives at global scope

This commit is contained in:
Vinnie Falco
2013-06-27 14:46:00 -07:00
parent 6f03efa882
commit 49340de0cd
5 changed files with 12 additions and 27 deletions

View File

@@ -6,12 +6,9 @@
SETUP_LOG (PeerDoor)
using namespace std;
using namespace boost::asio::ip;
PeerDoor::PeerDoor (boost::asio::io_service& io_service) :
mAcceptor (io_service,
tcp::endpoint (address ().from_string (theConfig.PEER_IP.empty () ? "0.0.0.0" : theConfig.PEER_IP),
boost::asio::ip::tcp::endpoint (boost::asio::ip::address ().from_string (theConfig.PEER_IP.empty () ? "0.0.0.0" : theConfig.PEER_IP),
theConfig.PEER_PORT)),
mCtx (boost::asio::ssl::context::sslv23), mDelayTimer (io_service)
{

View File

@@ -6,15 +6,14 @@
SETUP_LOG (RPCDoor)
using namespace std;
using namespace boost::asio::ip;
extern void initSSLContext (boost::asio::ssl::context& context,
std::string key_file, std::string cert_file, std::string chain_file);
RPCDoor::RPCDoor (boost::asio::io_service& io_service) :
mAcceptor (io_service, tcp::endpoint (address::from_string (theConfig.RPC_IP), theConfig.RPC_PORT)),
mDelayTimer (io_service), mSSLContext (boost::asio::ssl::context::sslv23)
RPCDoor::RPCDoor (boost::asio::io_service& io_service)
: mAcceptor (io_service,
boost::asio::ip::tcp::endpoint (boost::asio::ip::address::from_string (theConfig.RPC_IP), theConfig.RPC_PORT))
, mDelayTimer (io_service)
, mSSLContext (boost::asio::ssl::context::sslv23)
{
WriteLog (lsINFO, RPCDoor) << "RPC port: " << theConfig.RPC_IP << " " << theConfig.RPC_PORT << " allow remote: " << theConfig.RPC_ALLOW_REMOTE;

View File

@@ -10,9 +10,6 @@ namespace po = boost::program_options;
extern void TFInit ();
extern void LEFInit ();
using namespace std;
using namespace boost::unit_test;
void setupServer ()
{
theApp = IApplication::New ();
@@ -56,6 +53,8 @@ bool init_unit_test ()
void printHelp (const po::options_description& desc)
{
using namespace std;
cerr << SYSTEM_NAME "d [options] <command> <params>" << endl;
cerr << desc << endl;
@@ -121,6 +120,8 @@ void printHelp (const po::options_description& desc)
int rippleMain (int argc, char** argv)
{
using namespace std;
setCallingThreadName ("main");
int iResult = 0;
po::variables_map vm; // Map of options.
@@ -214,7 +215,7 @@ int rippleMain (int argc, char** argv)
if (vm.count ("unittest"))
{
unit_test_main (init_unit_test, argc, argv);
boost::unit_test::unit_test_main (init_unit_test, argc, argv);
return 0;
}

View File

@@ -5,15 +5,10 @@
//==============================================================================
// Used for logging
struct RPC
{
};
struct RPC;
SETUP_LOG (RPC)
using namespace boost;
using namespace boost::asio;
unsigned int const gMaxHTTPHeaderSize = 0x02000000;
std::string gFormatStr ("v1");