Using the std namespace within the souce file
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Wed, 13 Apr 2011 08:28:00 +0000 (10:28 +0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Wed, 13 Apr 2011 08:28:00 +0000 (10:28 +0200)
src/config/host.cpp
src/config/host.h

index 498f8bb..82b82a4 100644 (file)
@@ -4,11 +4,13 @@
 
 #include <boost/assert.hpp>
 
+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<uint16_t>::max() ) );
+    BOOST_ASSERT( ( 0 < port ) && ( port < numeric_limits<uint16_t>::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<int>::max() ) );
+    BOOST_ASSERT( ( 0 < interval_in_sec ) && ( interval_in_sec < numeric_limits<int>::max() ) );
 
     this->IntervalInSec = interval_in_sec;
 }
 
-std::vector<std::string> Host::get_options() const
+vector<string> Host::get_options() const
 {
     return Options;
 }
 
-void Host::set_options( const std::vector<std::string> &options )
+void Host::set_options( const vector<string> &options )
 {
     BOOST_ASSERT( 0 < options.size() );
 
index b828934..e2cee88 100644 (file)
@@ -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 );