From fcc96cfe8fa0c17c3535085ebce743970231b714 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 1 Nov 2013 00:13:30 +0100 Subject: [PATCH] Fix compilation with Visual Studio 2013. Refs #4987 --- components/cluster/endpoint.cpp | 2 +- lib/base/value.h | 2 +- lib/icinga/service-check.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/cluster/endpoint.cpp b/components/cluster/endpoint.cpp index 18bf6ea43..56f6c021a 100644 --- a/components/cluster/endpoint.cpp +++ b/components/cluster/endpoint.cpp @@ -41,7 +41,7 @@ boost::signals2::signal End */ bool Endpoint::IsConnected(void) const { - return GetClient(); + return GetClient() != NULL; } Stream::Ptr Endpoint::GetClient(void) const diff --git a/lib/base/value.h b/lib/base/value.h index 32f174a9b..1abf97936 100644 --- a/lib/base/value.h +++ b/lib/base/value.h @@ -97,7 +97,7 @@ public: if (!IsObject()) return false; - return (dynamic_pointer_cast(boost::get(m_Value))); + return (dynamic_pointer_cast(boost::get(m_Value)) != NULL); } static Value FromJson(cJSON *json); diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp index 9a7b95b7e..cdcf874cf 100644 --- a/lib/icinga/service-check.cpp +++ b/lib/icinga/service-check.cpp @@ -125,7 +125,7 @@ void Service::UpdateNextCheck(void) bool Service::HasBeenChecked(void) const { - return GetLastCheckResult(); + return GetLastCheckResult() != NULL; } double Service::GetLastCheck(void) const