summaryrefslogtreecommitdiff
path: root/src/clientiface.h
diff options
context:
space:
mode:
authorSfan5 <sfan5@live.de>2014-04-15 19:49:32 +0200
committerSfan5 <sfan5@live.de>2014-04-15 21:34:53 +0200
commit118e2ae865bd7a0020586ef72d05bf14d66f4eae (patch)
tree5da3d9bc1d4e26e7e75f61b5ea10916161f29cba /src/clientiface.h
parentd436502fa499255236350fc9204f9c508414704e (diff)
downloadminetest-118e2ae865bd7a0020586ef72d05bf14d66f4eae.tar.gz
minetest-118e2ae865bd7a0020586ef72d05bf14d66f4eae.tar.bz2
minetest-118e2ae865bd7a0020586ef72d05bf14d66f4eae.zip
Fix all warnings reported by clang
Diffstat (limited to 'src/clientiface.h')
-rw-r--r--src/clientiface.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clientiface.h b/src/clientiface.h
index 95f8bd305..752e2bb8a 100644
--- a/src/clientiface.h
+++ b/src/clientiface.h
@@ -141,6 +141,8 @@ namespace con {
class Connection;
}
+#define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
+
enum ClientState
{
Invalid,
@@ -219,7 +221,6 @@ public:
m_nearest_unsent_d(0),
m_nearest_unsent_reset_timer(0.0),
m_excess_gotblocks(0),
- m_nothing_to_send_counter(0),
m_nothing_to_send_pause_timer(0.0),
m_name(""),
m_version_major(0),
@@ -355,7 +356,6 @@ private:
u32 m_excess_gotblocks;
// CPU usage optimization
- u32 m_nothing_to_send_counter;
float m_nothing_to_send_pause_timer;
/*
@@ -433,7 +433,7 @@ public:
{ assert(m_env == 0); m_env = env; }
static std::string state2Name(ClientState state) {
- assert(state < sizeof(statenames));
+ assert((int) state < ARRAYSIZE(statenames));
return statenames[state];
}