Skip to content

Commit 53bf62b

Browse files
committedAug 6, 2013
Rename LagPool's member variables to avoid MSVC freaking up due to it's #define max
1 parent 61f2409 commit 53bf62b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

‎src/content_sao.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -124,30 +124,30 @@ class LuaEntitySAO : public ServerActiveObject
124124

125125
class LagPool
126126
{
127-
float pool;
128-
float max;
127+
float m_pool;
128+
float m_max;
129129
public:
130-
LagPool(): pool(15), max(15)
130+
LagPool(): m_pool(15), m_max(15)
131131
{}
132132
void setMax(float new_max)
133133
{
134-
max = new_max;
135-
if(pool > new_max)
136-
pool = new_max;
134+
m_max = new_max;
135+
if(m_pool > new_max)
136+
m_pool = new_max;
137137
}
138138
void add(float dtime)
139139
{
140-
pool -= dtime;
141-
if(pool < 0)
142-
pool = 0;
140+
m_pool -= dtime;
141+
if(m_pool < 0)
142+
m_pool = 0;
143143
}
144144
bool grab(float dtime)
145145
{
146146
if(dtime <= 0)
147147
return true;
148-
if(pool + dtime > max)
148+
if(m_pool + dtime > m_max)
149149
return false;
150-
pool += dtime;
150+
m_pool += dtime;
151151
return true;
152152
}
153153
};

0 commit comments

Comments
 (0)
Please sign in to comment.