Clang format: fix LINT on old PR which doesn't have LINT enabled

This commit is contained in:
Loic Blot 2017-04-10 08:05:03 +02:00
parent 0a8834608d
commit 0419552c92
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987
3 changed files with 16 additions and 30 deletions

@ -17,14 +17,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "script/common/c_converter.h"
#include "l_localplayer.h"
#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)
{
@ -335,10 +332,7 @@ 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)
{
@ -382,10 +376,8 @@ 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),
@ -412,5 +404,4 @@ const luaL_reg LuaLocalPlayer::methods[] = {
luamethod(LuaLocalPlayer, get_movement_speed),
luamethod(LuaLocalPlayer, get_movement),
{0, 0}
};
{0, 0}};

@ -22,12 +22,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "l_base.h"
class LocalPlayer;
class LuaLocalPlayer : public ModApiBase {
class LuaLocalPlayer : public ModApiBase
{
private:
static const char className[];
static const luaL_Reg methods[];
@ -91,5 +90,4 @@ public:
static void Register(lua_State *L);
};
#endif // MINETEST_L_LOCALPLAYER_H

@ -38,10 +38,7 @@ struct ItemMesh
*/
std::vector<std::pair<bool, video::SColor>> buffer_colors;
ItemMesh():
mesh(NULL),
buffer_colors()
{}
ItemMesh() : mesh(NULL), buffer_colors() {}
};
/*