Skip to content

Commit a487427

Browse files
committed
Fix clang-format Columns Width
Also fix l_client.cpp/h and remove them from whitelist
1 parent 529ba80 commit a487427

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ BreakBeforeBraces: Linux
55
AllowShortIfStatementsOnASingleLine: false
66
IndentCaseLabels: false
77
AccessModifierOffset: -8
8+
ColumnLimit: 90
89
IncludeCategories:
910
- Regex: '^".*'
1011
Priority: 2

src/script/lua_api/l_client.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
1919
*/
2020

2121
#include "l_client.h"
22-
#include "l_internal.h"
23-
#include "util/string.h"
22+
#include "common/c_content.h"
23+
#include "common/c_converter.h"
2424
#include "cpp_api/s_base.h"
2525
#include "gettext.h"
26-
#include "common/c_converter.h"
27-
#include "common/c_content.h"
26+
#include "l_internal.h"
2827
#include "lua_api/l_item.h"
28+
#include "util/string.h"
2929

3030
int ModApiClient::l_get_current_modname(lua_State *L)
3131
{
@@ -88,7 +88,7 @@ int ModApiClient::l_get_player_names(lua_State *L)
8888
// show_formspec(formspec)
8989
int ModApiClient::l_show_formspec(lua_State *L)
9090
{
91-
if ( !lua_isstring(L, 1) || !lua_isstring(L, 2) )
91+
if (!lua_isstring(L, 1) || !lua_isstring(L, 2))
9292
return 0;
9393

9494
ClientEvent event;
@@ -142,8 +142,7 @@ int ModApiClient::l_get_node_or_nil(lua_State *L)
142142
if (pos_ok) {
143143
// Return node
144144
pushnode(L, n, getClient(L)->ndef());
145-
}
146-
else {
145+
} else {
147146
lua_pushnil(L);
148147
}
149148
return 1;

src/script/lua_api/l_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2323

2424
#include "lua_api/l_base.h"
2525

26-
class ModApiClient: public ModApiBase
26+
class ModApiClient : public ModApiBase
2727
{
2828
private:
2929
// get_current_modname()
3030
static int l_get_current_modname(lua_State *L);
3131

3232
// display_chat_message(message)
3333
static int l_display_chat_message(lua_State *L);
34-
34+
3535
// get_player_names()
3636
static int l_get_player_names(lua_State *L);
3737

util/travis/clang-format-whitelist.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,6 @@ src/script/lua_api/l_areastore.cpp
287287
src/script/lua_api/l_areastore.h
288288
src/script/lua_api/l_base.cpp
289289
src/script/lua_api/l_base.h
290-
src/script/lua_api/l_client.cpp
291-
src/script/lua_api/l_client.h
292290
src/script/lua_api/l_craft.cpp
293291
src/script/lua_api/l_craft.h
294292
src/script/lua_api/l_env.cpp

0 commit comments

Comments
 (0)