Skip to content

Commit

Permalink
Fix clang-format Columns Width
Browse files Browse the repository at this point in the history
Also fix l_client.cpp/h and remove them from whitelist
  • Loading branch information
nerzhul committed Mar 31, 2017
1 parent 529ba80 commit a487427
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions .clang-format
Expand Up @@ -5,6 +5,7 @@ BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AccessModifierOffset: -8
ColumnLimit: 90
IncludeCategories:
- Regex: '^".*'
Priority: 2
Expand Down
13 changes: 6 additions & 7 deletions src/script/lua_api/l_client.cpp
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/script/lua_api/l_client.h
Expand Up @@ -23,15 +23,15 @@ 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()
static int l_get_current_modname(lua_State *L);

// 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);

Expand Down
2 changes: 0 additions & 2 deletions util/travis/clang-format-whitelist.txt
Expand Up @@ -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
Expand Down

0 comments on commit a487427

Please sign in to comment.