From c6c54dfbbf1f35863bd2896df5a044fb9eda4ec7 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Thu, 26 Jan 2012 07:43:04 -0200 Subject: [PATCH] Using LinkStatusItem type as an alias to the boost::shared_ptr. --- src/host/hoststatus.cpp | 3 +-- src/host/hoststatus.h | 6 ++---- src/host/pingscheduler.cpp | 3 +-- src/host/pingscheduler.h | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/host/hoststatus.cpp b/src/host/hoststatus.cpp index d7634ee..1b8b934 100644 --- a/src/host/hoststatus.cpp +++ b/src/host/hoststatus.cpp @@ -24,7 +24,6 @@ on this file might be covered by the GNU General Public License. #include using namespace std; -using boost::shared_ptr; //----------------------------------------------------------------------------- // HostStatus @@ -39,7 +38,7 @@ using boost::shared_ptr; HostStatus::HostStatus( const string &host_address, const int ping_fail_limit_percentage, - const shared_ptr link_analyzer + const LinkStatusItem link_analyzer ) : HostAddress( host_address ), LinkAnalyzer( link_analyzer ), diff --git a/src/host/hoststatus.h b/src/host/hoststatus.h index e01deb2..c5f558d 100644 --- a/src/host/hoststatus.h +++ b/src/host/hoststatus.h @@ -22,8 +22,6 @@ on this file might be covered by the GNU General Public License. #include -#include - #include "link/linkstatus.h" //----------------------------------------------------------------------------- @@ -41,7 +39,7 @@ public: HostStatus( const std::string &host_address, const int ping_fail_limit_percentage, - const boost::shared_ptr link_analyzer + const LinkStatusItem link_analyzer ); ~HostStatus(); @@ -61,7 +59,7 @@ private: /// the DNS address of the host to analyze std::string HostAddress; /// the object responsible to analyze the link - const boost::shared_ptr LinkAnalyzer; + const LinkStatusItem LinkAnalyzer; /// the maximum amount of pings that can fail without warning int PingFailLimitPercentage; /// the amount of IPs that are aliases to the host DNS diff --git a/src/host/pingscheduler.cpp b/src/host/pingscheduler.cpp index da3b742..e0c3fba 100644 --- a/src/host/pingscheduler.cpp +++ b/src/host/pingscheduler.cpp @@ -37,7 +37,6 @@ using boost::date_time::time_resolution_traits_adapted64_impl; using boost::posix_time::microsec_clock; using boost::posix_time::ptime; using boost::posix_time::seconds; -using boost::shared_ptr; using boost::thread; using I2n::Logger::GlobalLogger; @@ -53,7 +52,7 @@ PingScheduler::PingScheduler( const long ping_interval_in_sec, const int ping_fail_percentage_limit, const string &nameserver, - shared_ptr link_analyzer + LinkStatusItem link_analyzer ) : IoService(), diff --git a/src/host/pingscheduler.h b/src/host/pingscheduler.h index f916565..b12b8f2 100644 --- a/src/host/pingscheduler.h +++ b/src/host/pingscheduler.h @@ -56,7 +56,7 @@ public: const long ping_interval_in_sec, const int ping_fail_percentage_limit, const std::string &nameserver, - boost::shared_ptr link_analyzer + LinkStatusItem link_analyzer ); ~PingScheduler(); -- 1.7.1