summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-10-15 01:55:59 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-10-15 01:55:59 +0200
commit555734fcd3aef4c83605d70d0456dda28b7b5ace (patch)
tree9c34fe5bc58d5f3d4c0a7622045adc7aa1d17a98 /crawl-ref/source/clua.cc
parentacf5187334f2cfb983a1a8de07d1e77f73e4283a (diff)
downloadcrawl-ref-555734fcd3aef4c83605d70d0456dda28b7b5ace.tar.gz
crawl-ref-555734fcd3aef4c83605d70d0456dda28b7b5ace.zip
Massive spacing fixes: "( spaces after parentheses )".
I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r--crawl-ref/source/clua.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index f11a42d5c9..d1bdc6167e 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -133,7 +133,7 @@ int CLua::file_write(lua_State *ls)
luaL_argerror(ls, 1, "Expected filehandle at arg 1");
return (0);
}
- CLuaSave *sf = static_cast<CLuaSave *>( lua_touserdata(ls, 1) );
+ CLuaSave *sf = static_cast<CLuaSave *>(lua_touserdata(ls, 1));
if (!sf)
return (0);
@@ -285,7 +285,7 @@ bool CLua::runhook(const char *hook, const char *params, ...)
if (!lua_istable(ls, -1))
{
lua_pop(ls, 1);
- CL_RESETSTACK_RETURN( ls, stack_top, false );
+ CL_RESETSTACK_RETURN(ls, stack_top, false);
}
for (int i = 1; ; ++i)
{
@@ -305,7 +305,7 @@ bool CLua::runhook(const char *hook, const char *params, ...)
lua_settop(ls, currtop);
}
- CL_RESETSTACK_RETURN( ls, stack_top, true );
+ CL_RESETSTACK_RETURN(ls, stack_top, true);
}
void CLua::fnreturns(const char *format, ...)
@@ -422,7 +422,7 @@ int CLua::push_args(lua_State *ls, const char *format, va_list args,
clua_push_map(ls, va_arg(args, map_def *));
break;
case 'M':
- push_monster(ls, va_arg(args, monster* ));
+ push_monster(ls, va_arg(args, monster*));
break;
case 'I':
lua_push_moninf(ls, va_arg(args, monster_info *));
@@ -815,7 +815,7 @@ bool lua_text_pattern::valid() const
return translated? isvalid : translate();
}
-bool lua_text_pattern::matches( const std::string &s ) const
+bool lua_text_pattern::matches(const std::string &s) const
{
if (isvalid && !translated)
translate();
@@ -829,7 +829,7 @@ bool lua_text_pattern::matches( const std::string &s ) const
void lua_text_pattern::pre_pattern(std::string &pat, std::string &fn) const
{
// Trim trailing spaces
- pat.erase( pat.find_last_not_of(" \t\n\r") + 1 );
+ pat.erase(pat.find_last_not_of(" \t\n\r") + 1);
fn += " pmatch([[";
fn += pat;
@@ -840,7 +840,7 @@ void lua_text_pattern::pre_pattern(std::string &pat, std::string &fn) const
void lua_text_pattern::post_pattern(std::string &pat, std::string &fn) const
{
- pat.erase( 0, pat.find_first_not_of(" \t\n\r") );
+ pat.erase(0, pat.find_first_not_of(" \t\n\r"));
fn += " pmatch([[";
fn += pat;
@@ -887,7 +887,7 @@ bool lua_text_pattern::translate() const
currop = &lop;
luafn += lop.luatok;
- i += strlen( lop.token ) - 1;
+ i += strlen(lop.token) - 1;
break;
}
@@ -906,7 +906,7 @@ bool lua_text_pattern::translate() const
const_cast<lua_text_pattern *>(this)->translated = true;
- int err = clua.execstring( luafn.c_str(), "stash-search" );
+ int err = clua.execstring(luafn.c_str(), "stash-search");
if (err)
{
lua_text_pattern *self = const_cast<lua_text_pattern *>(this);
@@ -946,7 +946,7 @@ static int _clua_panic(lua_State *ls)
static void *_clua_allocator(void *ud, void *ptr, size_t osize, size_t nsize)
{
- CLua *cl = static_cast<CLua *>( ud );
+ CLua *cl = static_cast<CLua *>(ud);
cl->memory_used += nsize - osize;
if (nsize > osize && cl->memory_used >= CLUA_MAX_MEMORY_USE * 1024