mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Fixed compilation warnings on Windows.
This commit is contained in:
parent
d00b14bac8
commit
4aa166ba29
@ -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) {
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user