summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/coordit.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-05-09 22:52:20 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-05-09 22:52:20 +0200
commita5726ed7d5f0294230cc6a1bf61e33ad9e07a9f6 (patch)
treed3efd792eb2447e7cb8e9abf27ac98f17d6751de /crawl-ref/source/coordit.cc
parentef70f21f573cc66fde5a32562b9eb5859b2e36dd (diff)
downloadcrawl-ref-a5726ed7d5f0294230cc6a1bf61e33ad9e07a9f6.tar.gz
crawl-ref-a5726ed7d5f0294230cc6a1bf61e33ad9e07a9f6.zip
Formatting fixes.
Diffstat (limited to 'crawl-ref/source/coordit.cc')
-rw-r--r--crawl-ref/source/coordit.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/crawl-ref/source/coordit.cc b/crawl-ref/source/coordit.cc
index 78fb358a65..ce407150ff 100644
--- a/crawl-ref/source/coordit.cc
+++ b/crawl-ref/source/coordit.cc
@@ -75,11 +75,11 @@ random_rectangle_iterator::random_rectangle_iterator(const coord_def& corner1,
top_left.x = left;
top_left.y = top;
- for(int y = top; y <= bottom; y++)
- for(int x = left; x <= right; x++)
+ for (int y = top; y <= bottom; y++)
+ for (int x = left; x <= right; x++)
remaining.push_back(coord_def(x, y));
- if(remaining.empty())
+ if (remaining.empty())
current = 0;
else
current = random2(remaining.size());
@@ -97,11 +97,11 @@ random_rectangle_iterator::random_rectangle_iterator(int x_border_dist,
top_left.x = x_border_dist;
top_left.y = y_border_dist;
- for(int y = y_border_dist; y <= bottom; y++)
- for(int x = x_border_dist; x <= right; x++)
+ for (int y = y_border_dist; y <= bottom; y++)
+ for (int x = x_border_dist; x <= right; x++)
remaining.push_back(coord_def(x, y));
- if(remaining.empty())
+ if (remaining.empty())
current = 0;
else
current = random2(remaining.size());
@@ -114,7 +114,7 @@ random_rectangle_iterator::operator bool() const
coord_def random_rectangle_iterator::operator *() const
{
- if(remaining.empty())
+ if (remaining.empty())
return top_left;
else
return remaining[current];
@@ -122,7 +122,7 @@ coord_def random_rectangle_iterator::operator *() const
const coord_def* random_rectangle_iterator::operator->() const
{
- if(remaining.empty())
+ if (remaining.empty())
return &top_left;
else
return &(remaining[current]);
@@ -130,11 +130,11 @@ const coord_def* random_rectangle_iterator::operator->() const
void random_rectangle_iterator::operator ++()
{
- if(!remaining.empty())
+ if (!remaining.empty())
{
remaining[current] = remaining.back();
remaining.pop_back();
- if(!remaining.empty())
+ if (!remaining.empty())
current = random2(remaining.size());
}
}