From: Guilherme Maciel Ferreira Date: Wed, 13 Apr 2011 08:28:00 +0000 (+0200) Subject: Using the std namespace within the souce file X-Git-Tag: v1.0~81 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=07414c7c359389c6e87cf12d0225a8386fd2d388;p=pingcheck Using the std namespace within the souce file --- diff --git a/src/config/host.cpp b/src/config/host.cpp index 498f8bb..82b82a4 100644 --- a/src/config/host.cpp +++ b/src/config/host.cpp @@ -4,11 +4,13 @@ #include +using namespace std; + //----------------------------------------------------------------------------- // Host //----------------------------------------------------------------------------- -Host::Host( std::string address ) : +Host::Host( string address ) : Address( address ), Port( 0 ), IntervalInSec( 0 ), @@ -20,12 +22,12 @@ Host::~Host() { } -std::string Host::get_address() const +string Host::get_address() const { return Address; } -void Host::set_address( const std::string& address ) +void Host::set_address( const string &address ) { BOOST_ASSERT( !address.empty() ); @@ -39,7 +41,7 @@ uint16_t Host::get_port() const void Host::set_port( const uint16_t port ) { - BOOST_ASSERT( ( 0 < port ) && ( port < std::numeric_limits::max() ) ); + BOOST_ASSERT( ( 0 < port ) && ( port < numeric_limits::max() ) ); this->Port = port; } @@ -51,17 +53,17 @@ int Host::get_interval_in_sec() const void Host::set_interval_in_sec( const int interval_in_sec ) { - BOOST_ASSERT( ( 0 < interval_in_sec ) && ( interval_in_sec < std::numeric_limits::max() ) ); + BOOST_ASSERT( ( 0 < interval_in_sec ) && ( interval_in_sec < numeric_limits::max() ) ); this->IntervalInSec = interval_in_sec; } -std::vector Host::get_options() const +vector Host::get_options() const { return Options; } -void Host::set_options( const std::vector &options ) +void Host::set_options( const vector &options ) { BOOST_ASSERT( 0 < options.size() ); diff --git a/src/config/host.h b/src/config/host.h index b828934..e2cee88 100644 --- a/src/config/host.h +++ b/src/config/host.h @@ -19,7 +19,7 @@ public: virtual ~Host(); std::string get_address() const; - void set_address( const std::string& address ); + void set_address( const std::string &address ); uint16_t get_port() const; void set_port( const uint16_t port );