summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Blocks/BlockTorch.h14
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp6
-rw-r--r--src/RankManager.cpp3
3 files changed, 13 insertions, 10 deletions
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index 0aabcdf67..eb201dd05 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -121,12 +121,14 @@ public:
// If on a block that can only hold a torch if torch is standing on it, return that face
if (
- ((BlockInQuestion == E_BLOCK_GLASS) ||
- (BlockInQuestion == E_BLOCK_FENCE) ||
- (BlockInQuestion == E_BLOCK_NETHER_BRICK_FENCE) ||
- (BlockInQuestion == E_BLOCK_COBBLESTONE_WALL) ||
- (BlockInQuestion == E_BLOCK_STONE_SLAB) ||
- (BlockInQuestion == E_BLOCK_WOODEN_SLAB)) &&
+ (
+ (BlockInQuestion == E_BLOCK_GLASS) ||
+ (BlockInQuestion == E_BLOCK_FENCE) ||
+ (BlockInQuestion == E_BLOCK_NETHER_BRICK_FENCE) ||
+ (BlockInQuestion == E_BLOCK_COBBLESTONE_WALL) ||
+ (BlockInQuestion == E_BLOCK_STONE_SLAB) ||
+ (BlockInQuestion == E_BLOCK_WOODEN_SLAB)
+ ) &&
(Face == BLOCK_FACE_TOP)
)
{
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index ef6802d2b..4f8eb59db 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -201,9 +201,9 @@ void cProtocolRecognizer::SendDisconnect(const AString & a_Reason)
SendData((const char *)&Packet, 1); // WriteByte()
AString UTF16 = UTF8ToRawBEUTF16(a_Reason.c_str(), a_Reason.length());
- static const short Size = htons((short)(UTF16.size() / 2));
- SendData((const char *)&Size, 2); // WriteShort()
- SendData(UTF16.data(), UTF16.size()); // WriteString()
+ static const u_short Size = htons((u_short)(UTF16.size() / 2));
+ SendData((const char *)&Size, 2); // WriteShort()
+ SendData(UTF16.data(), UTF16.size()); // WriteString()
}
}
diff --git a/src/RankManager.cpp b/src/RankManager.cpp
index c9b428e3b..4abe8d1e1 100644
--- a/src/RankManager.cpp
+++ b/src/RankManager.cpp
@@ -1822,7 +1822,8 @@ void cRankManager::ClearPlayerRanks(void)
ASSERT(m_IsInitialized);
cCSLock Lock(m_CS);
- try {
+ try
+ {
SQLite::Statement stmt(m_DB, "DELETE FROM PlayerRank");
stmt.exec();
}