]> git.lizzy.rs Git - minetest.git/commitdiff
Fix clang-format Columns Width
authorLoic Blot <loic.blot@unix-experience.fr>
Fri, 31 Mar 2017 20:29:34 +0000 (22:29 +0200)
committerLoic Blot <loic.blot@unix-experience.fr>
Fri, 31 Mar 2017 20:29:34 +0000 (22:29 +0200)
Also fix l_client.cpp/h and remove them from whitelist

.clang-format
src/script/lua_api/l_client.cpp
src/script/lua_api/l_client.h
util/travis/clang-format-whitelist.txt

index 82e2abf156aed04137bcfc075a1f76cb082c6c6a..547df6a9501467c3223f56d8071a158fac51f639 100644 (file)
@@ -5,6 +5,7 @@ BreakBeforeBraces: Linux
 AllowShortIfStatementsOnASingleLine: false
 IndentCaseLabels: false
 AccessModifierOffset: -8
+ColumnLimit: 90
 IncludeCategories:
   - Regex:           '^".*'
     Priority:        2
index 52c7f6f30dfdbdcbf395e524b4af9bb5907d101f..7cb89188ddbde73e2610e8185b9306034b6b7b3e 100644 (file)
@@ -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;
index fcf8c39ea80a39c1eea4f6f778469e6dfc3d3965..b79cc670d3d973573a3127c123098dc038d1ce72 100644 (file)
@@ -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 @@ class ModApiClient: public ModApiBase
 
        // 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);
 
index 519e594f95fb087fd86903c844295c99849b13d4..0d99793b445c0d7010a59632b686846913750aab 100644 (file)
@@ -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