diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-07-05 12:14:09 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-07-05 12:14:09 +0200 |
commit | c41419c4f47bbf0737d3fedf58128c835d2c4e3b (patch) | |
tree | 764ae18c107df39fd90af718922036bd245561ca /crawl-ref/source/l_dgnit.cc | |
parent | b80adef8882143cad34f3c8bcc9a8ccbd4440223 (diff) | |
download | crawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.tar.gz crawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.zip |
Drop parentheses around scalar values in "return".
Diffstat (limited to 'crawl-ref/source/l_dgnit.cc')
-rw-r--r-- | crawl-ref/source/l_dgnit.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crawl-ref/source/l_dgnit.cc b/crawl-ref/source/l_dgnit.cc index 68f490104a..7e2bdbc2ac 100644 --- a/crawl-ref/source/l_dgnit.cc +++ b/crawl-ref/source/l_dgnit.cc @@ -29,7 +29,7 @@ static item_list _lua_get_ilist(lua_State *ls, int ndx) if (!err.empty()) luaL_error(ls, err.c_str()); - return (ilist); + return ilist; } else { @@ -60,21 +60,21 @@ static int dgn_item_from_index(lua_State *ls) else lua_pushnil(ls); - return (1); + return 1; } static int dgn_items_at(lua_State *ls) { COORDS(c, 1, 2); lua_push_floor_items(ls, env.igrid(c)); - return (1); + return 1; } static int _dgn_item_spec(lua_State *ls) { const item_list ilist = _lua_get_ilist(ls, 1); dlua_push_object_type<item_list>(ls, ITEMLIST_METATABLE, ilist); - return (1); + return 1; } static int dgn_create_item(lua_State *ls) @@ -87,14 +87,14 @@ static int dgn_create_item(lua_State *ls) dgn_place_multiple_items(ilist, c, level); link_items(); - return (0); + return 0; } static int dgn_item_property_remove(lua_State *ls) { if (item_def *item = clua_get_item(ls, 1)) item->props.erase(luaL_checkstring(ls, 2)); - return (0); + return 0; } static int dgn_item_property_set(lua_State *ls) @@ -136,7 +136,7 @@ static int dgn_item_property_set(lua_State *ls) break; } } - return (0); + return 0; } static int dgn_item_property(lua_State *ls) @@ -152,7 +152,7 @@ static int dgn_item_property(lua_State *ls) if (!item->props.exists(key)) { lua_pushnil(ls); - return (1); + return 1; } switch (type[0]) @@ -180,14 +180,14 @@ static int dgn_item_property(lua_State *ls) const coord_def p(item->props[key].get_coord()); lua_pushnumber(ls, p.x); lua_pushnumber(ls, p.y); - return (2); + return 2; } default: luaL_error(ls, "Unknown type: '%s'", type.c_str()); break; } } - return (1); + return 1; } // Returns two arrays: one of floor items, one of shop items. @@ -242,7 +242,7 @@ static int dgn_stash_items(lua_State *ls) lua_rawseti(ls, -2, ++index); } - return (2); + return 2; } const struct luaL_reg dgn_item_dlib[] = |