diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
commit | 61cae4a761c2f72cda44ae269c7007b37a0c14a7 (patch) | |
tree | fec8ec71ca7ca6eebd9d48881bc5ee3fe27d04c1 /crawl-ref/source/luadgn.cc | |
parent | d4acdf4a6a4b73607d58714a66efd372674adb56 (diff) | |
download | crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.tar.gz crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.zip |
Misc. minor cleanups. (Yes, a huge amount of them but still...)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/luadgn.cc')
-rw-r--r-- | crawl-ref/source/luadgn.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/luadgn.cc b/crawl-ref/source/luadgn.cc index ca017d2fdf..2a0d2faac9 100644 --- a/crawl-ref/source/luadgn.cc +++ b/crawl-ref/source/luadgn.cc @@ -1432,11 +1432,9 @@ static int dgn_floor_halo(lua_State *ls) error += "'."; } else if (colour == BLACK) - { error += "Can't set floor colour to black."; - } - if (error != "") + if (!error.empty()) { luaL_argerror(ls, 2, error.c_str()); return(0); @@ -1553,7 +1551,7 @@ static cloud_type dgn_cloud_name_to_type(std::string name) static kill_category dgn_kill_name_to_category(std::string name) { - if (name == "") + if (name.empty()) return KC_OTHER; lowercase(name); @@ -1993,7 +1991,7 @@ static int dgn_count_feature_in_box(lua_State *ls) return 1; } - lua_pushnumber(ls, count_feature_in_box(x1, y1, x2, y2, feat)); + lua_pushnumber(ls, count_feature_in_box(x1, y1, x2, y2, feat)); return 1; } @@ -2011,7 +2009,7 @@ static int dgn_count_antifeature_in_box(lua_State *ls) return 1; } - lua_pushnumber(ls, count_antifeature_in_box(x1, y1, x2, y2, feat)); + lua_pushnumber(ls, count_antifeature_in_box(x1, y1, x2, y2, feat)); return 1; } @@ -2027,7 +2025,7 @@ static int dgn_count_neighbours(lua_State *ls) return 1; } - lua_pushnumber(ls, count_neighbours(x, y, feat)); + lua_pushnumber(ls, count_neighbours(x, y, feat)); return 1; } |