From b89f72b552cfff07340daba10b10de88e1724ba3 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 20 Aug 2013 12:50:24 +0200 Subject: [PATCH] Windows x64 build fix. --- components/livestatus/hostgroupstable.cpp | 2 +- components/livestatus/query.cpp | 4 ++-- components/livestatus/servicegroupstable.cpp | 2 +- components/livestatus/statustable.cpp | 4 ++-- lib/icinga/legacytimeperiod.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/livestatus/hostgroupstable.cpp b/components/livestatus/hostgroupstable.cpp index 9a7502830..990a2d857 100644 --- a/components/livestatus/hostgroupstable.cpp +++ b/components/livestatus/hostgroupstable.cpp @@ -153,7 +153,7 @@ Value HostGroupsTable::WorstHostStateAccessor(const Value& row) Value HostGroupsTable::NumHostsAccessor(const Value& row) { - return static_cast(row)->GetMembers().size(); + return static_cast(static_cast(row)->GetMembers().size()); } Value HostGroupsTable::NumHostsPendingAccessor(const Value& row) diff --git a/components/livestatus/query.cpp b/components/livestatus/query.cpp index f60e7fe5c..a1043891e 100644 --- a/components/livestatus/query.cpp +++ b/components/livestatus/query.cpp @@ -192,7 +192,7 @@ Query::Query(const std::vector& lines) if (num > deq.size()) { m_Verb = "ERROR"; m_ErrorCode = 451; - m_ErrorMessage = "Or/StatsOr is referencing " + Convert::ToString(num) + " filters; stack only contains " + Convert::ToString(deq.size()) + " filters"; + m_ErrorMessage = "Or/StatsOr is referencing " + Convert::ToString(num) + " filters; stack only contains " + Convert::ToString(static_cast(deq.size())) + " filters"; return; } @@ -440,7 +440,7 @@ void Query::PrintFixed16(const Stream::Ptr& stream, int code, const String& data ASSERT(code >= 100 && code <= 999); String sCode = Convert::ToString(code); - String sLength = Convert::ToString(data.GetLength()); + String sLength = Convert::ToString(static_cast(data.GetLength())); String header = sCode + String(16 - 3 - sLength.GetLength() - 1, ' ') + sLength + m_Separators[0]; stream->Write(header.CStr(), header.GetLength()); diff --git a/components/livestatus/servicegroupstable.cpp b/components/livestatus/servicegroupstable.cpp index 9aacdc89f..0904173fc 100644 --- a/components/livestatus/servicegroupstable.cpp +++ b/components/livestatus/servicegroupstable.cpp @@ -149,7 +149,7 @@ Value ServiceGroupsTable::WorstServiceStateAccessor(const Value& row) Value ServiceGroupsTable::NumServicesAccessor(const Value& row) { - return static_cast(row)->GetMembers().size(); + return static_cast(static_cast(row)->GetMembers().size()); } Value ServiceGroupsTable::NumServicesOkAccessor(const Value& row) diff --git a/components/livestatus/statustable.cpp b/components/livestatus/statustable.cpp index b959b195d..ac8417e53 100644 --- a/components/livestatus/statustable.cpp +++ b/components/livestatus/statustable.cpp @@ -334,12 +334,12 @@ Value StatusTable::IntervalLengthAccessor(const Value& row) Value StatusTable::NumHostsAccessor(const Value& row) { - return DynamicType::GetObjects("Host").size(); + return static_cast(DynamicType::GetObjects("Host").size()); } Value StatusTable::NumServicesAccessor(const Value& row) { - return DynamicType::GetObjects("Service").size(); + return static_cast(DynamicType::GetObjects("Service").size()); } Value StatusTable::ProgramVersionAccessor(const Value& row) diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp index cf603e0f1..26fa5fe08 100644 --- a/lib/icinga/legacytimeperiod.cpp +++ b/lib/icinga/legacytimeperiod.cpp @@ -429,7 +429,7 @@ Array::Ptr LegacyTimePeriod::ScriptFunc(const TimePeriod::Ptr& tp, double begin, } } - Log(LogDebug, "icinga", "Legacy timeperiod update returned " + Convert::ToString(segments->GetLength()) + " segments."); + Log(LogDebug, "icinga", "Legacy timeperiod update returned " + Convert::ToString(static_cast(segments->GetLength())) + " segments."); return segments; } -- 2.40.0