Fixed compilation warnings on Windows.

This commit is contained in:
Gunnar Beutner 2012-07-02 18:40:30 +02:00
parent d00b14bac8
commit 4aa166ba29
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
using namespace icinga; using namespace icinga;
Ringbuffer::Ringbuffer(int slots) Ringbuffer::Ringbuffer(long slots)
: m_Slots(slots, 0), m_Offset(0) : m_Slots(slots, 0), m_Offset(0)
{ } { }
@ -13,7 +13,7 @@ int Ringbuffer::GetLength(void) const
void Ringbuffer::InsertValue(long tv, int num) void Ringbuffer::InsertValue(long tv, int num)
{ {
int offsetTarget = tv % m_Slots.size(); vector<int>::size_type offsetTarget = tv % m_Slots.size();
/* walk towards the target offset, resetting slots to 0 */ /* walk towards the target offset, resetting slots to 0 */
while (m_Offset != offsetTarget) { while (m_Offset != offsetTarget) {

View File

@ -7,7 +7,7 @@ namespace icinga
class I2_BASE_API Ringbuffer class I2_BASE_API Ringbuffer
{ {
public: public:
Ringbuffer(int slots); Ringbuffer(long slots);
int GetLength(void) const; int GetLength(void) const;
void InsertValue(long tv, int num); void InsertValue(long tv, int num);
@ -15,7 +15,7 @@ public:
private: private:
vector<int> m_Slots; vector<int> m_Slots;
int m_Offset; vector<int>::size_type m_Offset;
}; };
} }