diff options
author | Mattes D <github@xoft.cz> | 2015-10-08 16:16:53 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-10-08 17:43:26 +0200 |
commit | 66e8190ca801b78b66c29030e4ace783582b4ec8 (patch) | |
tree | e02c28ec25b98a8db58ec8e3aaf95263d0c168d1 /src | |
parent | Merge pull request #2533 from cuberite/LuaTLSClientCertFix (diff) | |
download | cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.tar cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.tar.gz cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.tar.bz2 cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.tar.lz cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.tar.xz cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.tar.zst cuberite-66e8190ca801b78b66c29030e4ace783582b4ec8.zip |
Diffstat (limited to 'src')
-rwxr-xr-x | src/CheckBasicStyle.lua | 12 | ||||
-rw-r--r-- | src/Mobs/Monster.cpp | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua index f9f8f6b4d..a3d21106a 100755 --- a/src/CheckBasicStyle.lua +++ b/src/CheckBasicStyle.lua @@ -187,11 +187,19 @@ local g_ViolationPatterns = {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%/[a-zA-Z0-9]+", "Add space around /"}, -- Check spaces around "&": - {"^[a-zA-Z0-9]+%&[a-zA-Z0-9]+", "Add space around /"}, - {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%&[a-zA-Z0-9]+", "Add space around /"}, + {"^[a-zA-Z0-9]+%&[a-zA-Z0-9]+", "Add space around &"}, + {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%&[a-zA-Z0-9]+", "Add space around &"}, {"^[a-zA-Z0-9]+%& [a-zA-Z0-9]+", "Add space before &"}, {"^[^\"]*[!@#$%%%^&*() %[%]\t][a-zA-Z0-9]+%& [a-zA-Z0-9]+", "Add space before &"}, + -- Check spaces around "==", "<=" and ">=": + {"==[a-zA-Z0-9]+", "Add space after =="}, + {"[a-zA-Z0-9]+==", "Add space before =="}, + {"<=[a-zA-Z0-9]+", "Add space after <="}, + {"[a-zA-Z0-9]+<=", "Add space before <="}, + {">=[a-zA-Z0-9]+", "Add space after >="}, + {"[a-zA-Z0-9]+>=", "Add space before >="}, + -- We don't like "Type const *" and "Type const &". Use "const Type *" and "const Type &" instead: {"const %&", "Use 'const Type &' instead of 'Type const &'"}, {"const %*", "Use 'const Type *' instead of 'Type const *'"}, diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 4d9b9ca06..7bf56bb47 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -320,7 +320,7 @@ bool cMonster::EnsureProperDestination(cChunk & a_Chunk) { for (x = -1; x <= 1; ++x) { - if ((x==0) && (z==0)) + if ((x == 0) && (z == 0)) { continue; } @@ -329,8 +329,8 @@ bool cMonster::EnsureProperDestination(cChunk & a_Chunk) { return false; } - RelX = FloorC(m_FinalDestination.x+x) - Chunk->GetPosX() * cChunkDef::Width; - RelZ = FloorC(m_FinalDestination.z+z) - Chunk->GetPosZ() * cChunkDef::Width; + RelX = FloorC(m_FinalDestination.x + x) - Chunk->GetPosX() * cChunkDef::Width; + RelZ = FloorC(m_FinalDestination.z + z) - Chunk->GetPosZ() * cChunkDef::Width; Chunk->GetBlockTypeMeta(RelX, FloorC(m_FinalDestination.y) - 1, RelZ, BlockType, BlockMeta); if (cBlockInfo::IsSolid(BlockType)) { |