Navigation Menu

Skip to content

Commit

Permalink
Clang-format styles fixes since previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Apr 10, 2017
1 parent 0419552 commit b4106ca
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Expand Up @@ -2,6 +2,7 @@ BasedOnStyle: LLVM
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Custom
Standard: Cpp03
BraceWrapping:
AfterClass: true
AfterControlStatement: false
Expand All @@ -16,6 +17,8 @@ AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AccessModifierOffset: -8
ColumnLimit: 90
AllowShortFunctionsOnASingleLine: Inline
SortIncludes: false
IncludeCategories:
- Regex: '^".*'
Priority: 2
Expand Down
19 changes: 14 additions & 5 deletions src/script/lua_api/l_localplayer.cpp
Expand Up @@ -21,7 +21,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "l_internal.h"
#include "script/common/c_converter.h"

LuaLocalPlayer::LuaLocalPlayer(LocalPlayer *m) { m_localplayer = m; }
LuaLocalPlayer::LuaLocalPlayer(LocalPlayer *m)
{
m_localplayer = m;
}

void LuaLocalPlayer::create(lua_State *L, LocalPlayer *m)
{
Expand Down Expand Up @@ -332,7 +335,10 @@ LuaLocalPlayer *LuaLocalPlayer::checkobject(lua_State *L, int narg)
return *(LuaLocalPlayer **)ud;
}

LocalPlayer *LuaLocalPlayer::getobject(LuaLocalPlayer *ref) { return ref->m_localplayer; }
LocalPlayer *LuaLocalPlayer::getobject(LuaLocalPlayer *ref)
{
return ref->m_localplayer;
}

LocalPlayer *LuaLocalPlayer::getobject(lua_State *L, int narg)
{
Expand Down Expand Up @@ -376,8 +382,10 @@ void LuaLocalPlayer::Register(lua_State *L)
}

const char LuaLocalPlayer::className[] = "LocalPlayer";
const luaL_reg LuaLocalPlayer::methods[] = {luamethod(LuaLocalPlayer, get_velocity),
luamethod(LuaLocalPlayer, get_hp), luamethod(LuaLocalPlayer, get_name),
const luaL_reg LuaLocalPlayer::methods[] = {
luamethod(LuaLocalPlayer, get_velocity),
luamethod(LuaLocalPlayer, get_hp),
luamethod(LuaLocalPlayer, get_name),
luamethod(LuaLocalPlayer, is_teleported),
luamethod(LuaLocalPlayer, is_attached),
luamethod(LuaLocalPlayer, is_touching_ground),
Expand All @@ -404,4 +412,5 @@ const luaL_reg LuaLocalPlayer::methods[] = {luamethod(LuaLocalPlayer, get_veloci
luamethod(LuaLocalPlayer, get_movement_speed),
luamethod(LuaLocalPlayer, get_movement),

{0, 0}};
{0, 0}
};
2 changes: 1 addition & 1 deletion src/wieldmesh.h
Expand Up @@ -36,7 +36,7 @@ struct ItemMesh
* If the boolean is true, the color is fixed, else
* palettes can modify it.
*/
std::vector<std::pair<bool, video::SColor>> buffer_colors;
std::vector<std::pair<bool, video::SColor> > buffer_colors;

ItemMesh() : mesh(NULL), buffer_colors() {}
};
Expand Down
1 change: 1 addition & 0 deletions util/travis/clang-format-whitelist.txt
Expand Up @@ -284,6 +284,7 @@ src/script/lua_api/l_item.cpp
src/script/lua_api/l_item.h
src/script/lua_api/l_itemstackmeta.cpp
src/script/lua_api/l_itemstackmeta.h
src/script/lua_api/l_localplayer.cpp
src/script/lua_api/l_mainmenu.cpp
src/script/lua_api/l_mainmenu.h
src/script/lua_api/l_mapgen.cpp
Expand Down

0 comments on commit b4106ca

Please sign in to comment.