aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-03-31 22:29:34 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2017-03-31 22:29:34 +0200
commita4874270f791fae8745cac23e153c59bef81bd1e (patch)
tree57c23095f61550700b6f7d863a5cbd196bd7237e
parent529ba8002d686cdf004405e033fe7e95ea6cbacd (diff)
downloadminetest-a4874270f791fae8745cac23e153c59bef81bd1e.tar.gz
minetest-a4874270f791fae8745cac23e153c59bef81bd1e.tar.bz2
minetest-a4874270f791fae8745cac23e153c59bef81bd1e.zip
Fix clang-format Columns Width
Also fix l_client.cpp/h and remove them from whitelist
-rw-r--r--.clang-format1
-rw-r--r--src/script/lua_api/l_client.cpp13
-rw-r--r--src/script/lua_api/l_client.h4
-rw-r--r--util/travis/clang-format-whitelist.txt2
4 files changed, 9 insertions, 11 deletions
diff --git a/.clang-format b/.clang-format
index 82e2abf15..547df6a95 100644
--- a/.clang-format
+++ b/.clang-format
@@ -5,6 +5,7 @@ BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AccessModifierOffset: -8
+ColumnLimit: 90
IncludeCategories:
- Regex: '^".*'
Priority: 2
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp
index 52c7f6f30..7cb89188d 100644
--- a/src/script/lua_api/l_client.cpp
+++ b/src/script/lua_api/l_client.cpp
@@ -19,13 +19,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "l_client.h"
-#include "l_internal.h"
-#include "util/string.h"
+#include "common/c_content.h"
+#include "common/c_converter.h"
#include "cpp_api/s_base.h"
#include "gettext.h"
-#include "common/c_converter.h"
-#include "common/c_content.h"
+#include "l_internal.h"
#include "lua_api/l_item.h"
+#include "util/string.h"
int ModApiClient::l_get_current_modname(lua_State *L)
{
@@ -88,7 +88,7 @@ int ModApiClient::l_get_player_names(lua_State *L)
// show_formspec(formspec)
int ModApiClient::l_show_formspec(lua_State *L)
{
- if ( !lua_isstring(L, 1) || !lua_isstring(L, 2) )
+ if (!lua_isstring(L, 1) || !lua_isstring(L, 2))
return 0;
ClientEvent event;
@@ -142,8 +142,7 @@ int ModApiClient::l_get_node_or_nil(lua_State *L)
if (pos_ok) {
// Return node
pushnode(L, n, getClient(L)->ndef());
- }
- else {
+ } else {
lua_pushnil(L);
}
return 1;
diff --git a/src/script/lua_api/l_client.h b/src/script/lua_api/l_client.h
index fcf8c39ea..b79cc670d 100644
--- a/src/script/lua_api/l_client.h
+++ b/src/script/lua_api/l_client.h
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_base.h"
-class ModApiClient: public ModApiBase
+class ModApiClient : public ModApiBase
{
private:
// get_current_modname()
@@ -31,7 +31,7 @@ private:
// display_chat_message(message)
static int l_display_chat_message(lua_State *L);
-
+
// get_player_names()
static int l_get_player_names(lua_State *L);
diff --git a/util/travis/clang-format-whitelist.txt b/util/travis/clang-format-whitelist.txt
index 519e594f9..0d99793b4 100644
--- a/util/travis/clang-format-whitelist.txt
+++ b/util/travis/clang-format-whitelist.txt
@@ -287,8 +287,6 @@ src/script/lua_api/l_areastore.cpp
src/script/lua_api/l_areastore.h
src/script/lua_api/l_base.cpp
src/script/lua_api/l_base.h
-src/script/lua_api/l_client.cpp
-src/script/lua_api/l_client.h
src/script/lua_api/l_craft.cpp
src/script/lua_api/l_craft.h
src/script/lua_api/l_env.cpp