summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-layouts.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-07-05 02:18:52 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-07-05 02:23:41 +0200
commit52acb806cc85d5e34a20517b02594c161dad9cdd (patch)
tree853efae5a6e85e539a81721c9795bbee18fd7cac /crawl-ref/source/dgn-layouts.cc
parent3ba445871afb05180862712e32c4c979dc6db786 (diff)
downloadcrawl-ref-52acb806cc85d5e34a20517b02594c161dad9cdd.tar.gz
crawl-ref-52acb806cc85d5e34a20517b02594c161dad9cdd.zip
cppcheck: reduce scope of some variables.
This can improve readability somewhat, and can speed up debug builds.
Diffstat (limited to 'crawl-ref/source/dgn-layouts.cc')
-rw-r--r--crawl-ref/source/dgn-layouts.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/dgn-layouts.cc b/crawl-ref/source/dgn-layouts.cc
index 65ef6a876f..3b989a6e49 100644
--- a/crawl-ref/source/dgn-layouts.cc
+++ b/crawl-ref/source/dgn-layouts.cc
@@ -701,14 +701,12 @@ static void _big_room(int level_number)
{
dungeon_feature_type type_floor = DNGN_FLOOR;
dungeon_feature_type type_2 = DNGN_FLOOR;
- int i, j, k, l;
dgn_region region;
- int oblique;
if (one_chance_in(4))
{
- oblique = 5 + random2(20);
+ int oblique = 5 + random2(20);
region = dgn_region(8 + random2(30), 8 + random2(22),
21 + random2(10), 21 + random2(8));
@@ -765,10 +763,10 @@ static void _big_room(int level_number)
// Sometimes make an inside room w/ stone wall.
else if (one_chance_in(6))
{
- i = region.pos.x;
- j = region.pos.y;
- k = region.end().x;
- l = region.end().y;
+ int i = region.pos.x;
+ int j = region.pos.y;
+ int k = region.end().x;
+ int l = region.end().y;
do
{