Skip to content

Commit

Permalink
Fix LINT
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfoot547 committed May 22, 2017
1 parent 1832cdc commit adfe081
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
26 changes: 11 additions & 15 deletions src/script/lua_api/l_camera.cpp
Expand Up @@ -70,7 +70,7 @@ int LuaCamera::l_get_fov(lua_State *L)
lua_setfield(L, -2, "actual");
lua_pushnumber(L, camera->getZoomFov());
lua_setfield(L, -2, "zoom");

return 1;
}

Expand All @@ -79,10 +79,10 @@ int LuaCamera::l_set_fov(lua_State *L)
Camera *camera = getobject(L, 1);
if (!camera)
return 0;

if (!lua_isnumber(L, 2))
return 0;

float fov = lua_tonumber(L, 2);
camera->setFov(fov);
return 0;
Expand All @@ -93,10 +93,10 @@ int LuaCamera::l_set_zoom_fov(lua_State *L)
Camera *camera = getobject(L, 1);
if (!camera)
return 0;

if (!lua_isnumber(L, 2))
return 0;

float fov = lua_tonumber(L, 2);
camera->setZoomFov(fov);
return 0;
Expand All @@ -107,7 +107,7 @@ int LuaCamera::l_save_fov(lua_State *L)
Camera *camera = getobject(L, 1);
if (!camera)
return 0;

camera->saveFov();
return 0;
}
Expand All @@ -117,7 +117,7 @@ int LuaCamera::l_save_zoom_fov(lua_State *L)
Camera *camera = getobject(L, 1);
if (!camera)
return 0;

camera->saveZoomFov();
return 0;
}
Expand Down Expand Up @@ -243,14 +243,10 @@ void LuaCamera::Register(lua_State *L)

const char LuaCamera::className[] = "Camera";
const luaL_Reg LuaCamera::methods[] = {luamethod(LuaCamera, set_camera_mode),
luamethod(LuaCamera, get_camera_mode),
luamethod(LuaCamera, get_fov),
luamethod(LuaCamera, set_fov),
luamethod(LuaCamera, set_zoom_fov),
luamethod(LuaCamera, save_fov),
luamethod(LuaCamera, save_zoom_fov),
luamethod(LuaCamera, get_pos),
luamethod(LuaCamera, get_offset),
luamethod(LuaCamera, get_camera_mode), luamethod(LuaCamera, get_fov),
luamethod(LuaCamera, set_fov), luamethod(LuaCamera, set_zoom_fov),
luamethod(LuaCamera, save_fov), luamethod(LuaCamera, save_zoom_fov),
luamethod(LuaCamera, get_pos), luamethod(LuaCamera, get_offset),
luamethod(LuaCamera, get_look_dir),
luamethod(LuaCamera, get_look_vertical),
luamethod(LuaCamera, get_look_horizontal),
Expand Down
2 changes: 1 addition & 1 deletion src/script/lua_api/l_camera.h
Expand Up @@ -20,7 +20,7 @@ class LuaCamera : public ModApiBase
static int l_get_fov(lua_State *L);
static int l_set_fov(lua_State *L);
static int l_set_zoom_fov(lua_State *L);

static int l_save_fov(lua_State *L);
static int l_save_zoom_fov(lua_State *L);

Expand Down

0 comments on commit adfe081

Please sign in to comment.