summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_option.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-07-05 12:14:09 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-07-05 12:14:09 +0200
commitc41419c4f47bbf0737d3fedf58128c835d2c4e3b (patch)
tree764ae18c107df39fd90af718922036bd245561ca /crawl-ref/source/l_option.cc
parentb80adef8882143cad34f3c8bcc9a8ccbd4440223 (diff)
downloadcrawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.tar.gz
crawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.zip
Drop parentheses around scalar values in "return".
Diffstat (limited to 'crawl-ref/source/l_option.cc')
-rw-r--r--crawl-ref/source/l_option.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/l_option.cc b/crawl-ref/source/l_option.cc
index aa4a8e049c..9af66a9914 100644
--- a/crawl-ref/source/l_option.cc
+++ b/crawl-ref/source/l_option.cc
@@ -22,13 +22,13 @@ static int option_hboolean(lua_State *ls, const char *name, void *data,
if (get)
{
lua_pushboolean(ls, *static_cast<bool*>(data));
- return (1);
+ return 1;
}
else
{
if (lua_isboolean(ls, 3))
*static_cast<bool*>(data) = lua_toboolean(ls, 3);
- return (0);
+ return 0;
}
}
@@ -36,7 +36,7 @@ static int option_autopick(lua_State *ls, const char *name, void *data,
bool get)
{
lua_pushboolean(ls, Options.autopickup_on>0);
- return (1);
+ return 1;
}
static option_handler handlers[] =
@@ -74,14 +74,14 @@ static const option_handler *get_handler(const char *optname)
return &handlers[i];
}
}
- return (NULL);
+ return NULL;
}
static int option_get(lua_State *ls)
{
const char *opt = luaL_checkstring(ls, 2);
if (!opt)
- return (0);
+ return 0;
// Is this a Lua named option?
game_options::opt_map::iterator i = Options.named_options.find(opt);
@@ -89,7 +89,7 @@ static int option_get(lua_State *ls)
{
const std::string &ov = i->second;
lua_pushstring(ls, ov.c_str());
- return (1);
+ return 1;
}
const option_handler *oh = get_handler(opt);
@@ -100,20 +100,20 @@ static int option_get(lua_State *ls)
return (oh->handler(ls, opt, oh->data, true));
#endif
- return (0);
+ return 0;
}
static int option_set(lua_State *ls)
{
const char *opt = luaL_checkstring(ls, 2);
if (!opt)
- return (0);
+ return 0;
const option_handler *oh = get_handler(opt);
if (oh)
oh->handler(ls, opt, oh->data, false);
- return (0);
+ return 0;
}
#define OPT_METATABLE "clua_metatable_optaccess"