From: Gunnar Beutner Date: Mon, 2 Jul 2012 16:40:30 +0000 (+0200) Subject: Fixed compilation warnings on Windows. X-Git-Tag: v0.0.1~323 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4aa166ba297a6c115b5c93a7238db6c1a494e89a;p=icinga2 Fixed compilation warnings on Windows. --- diff --git a/base/ringbuffer.cpp b/base/ringbuffer.cpp index 88a094884..1d91f7ff2 100644 --- a/base/ringbuffer.cpp +++ b/base/ringbuffer.cpp @@ -2,7 +2,7 @@ using namespace icinga; -Ringbuffer::Ringbuffer(int slots) +Ringbuffer::Ringbuffer(long slots) : m_Slots(slots, 0), m_Offset(0) { } @@ -13,7 +13,7 @@ int Ringbuffer::GetLength(void) const void Ringbuffer::InsertValue(long tv, int num) { - int offsetTarget = tv % m_Slots.size(); + vector::size_type offsetTarget = tv % m_Slots.size(); /* walk towards the target offset, resetting slots to 0 */ while (m_Offset != offsetTarget) { diff --git a/base/ringbuffer.h b/base/ringbuffer.h index 5806c461b..c4c16bfed 100644 --- a/base/ringbuffer.h +++ b/base/ringbuffer.h @@ -7,7 +7,7 @@ namespace icinga class I2_BASE_API Ringbuffer { public: - Ringbuffer(int slots); + Ringbuffer(long slots); int GetLength(void) const; void InsertValue(long tv, int num); @@ -15,7 +15,7 @@ public: private: vector m_Slots; - int m_Offset; + vector::size_type m_Offset; }; }