summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/viewgeom.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-08-26 22:50:06 +0200
committerRaphael Langella <raphael.langella@gmail.com>2012-08-26 23:06:30 +0200
commit770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (patch)
treee030cf61afce9ca69b74bb38eb73734bf10f633e /crawl-ref/source/viewgeom.cc
parenta6c16c7f2066c854a01f25e9e6c3d8e44282a638 (diff)
downloadcrawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.tar.gz
crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.zip
Use std namespace.
I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
Diffstat (limited to 'crawl-ref/source/viewgeom.cc')
-rw-r--r--crawl-ref/source/viewgeom.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/viewgeom.cc b/crawl-ref/source/viewgeom.cc
index 99dc78ea87..8220e6a3ea 100644
--- a/crawl-ref/source/viewgeom.cc
+++ b/crawl-ref/source/viewgeom.cc
@@ -29,7 +29,7 @@
// Helper for layouts. Tries to increment lvalue without overflowing it.
static void _increment(int& lvalue, int delta, int max_value)
{
- lvalue = std::min(lvalue+delta, max_value);
+ lvalue = min(lvalue+delta, max_value);
}
class _layout
@@ -133,7 +133,7 @@ class _inline_layout : public _layout
else
{
viewp = termp;
- msgp = termp + coord_def(0, std::max(viewsz.y, hudsz.y+mlistsz.y));
+ msgp = termp + coord_def(0, max(viewsz.y, hudsz.y+mlistsz.y));
}
hudp = viewp + coord_def(viewsz.x+hud_gutter, 0);
mlistp = hudp + coord_def(0, hudsz.y);
@@ -144,14 +144,14 @@ class _inline_layout : public _layout
int leftover_x() const
{
- int width = (viewsz.x + hud_gutter + std::max(hudsz.x, mlistsz.x));
+ int width = (viewsz.x + hud_gutter + max(hudsz.x, mlistsz.x));
return (termsz.x - width);
}
int leftover_rightcol_y() const { return termsz.y-hudsz.y-mlistsz.y-msgsz.y; }
int leftover_leftcol_y() const { return termsz.y-viewsz.y-msgsz.y; }
int leftover_y() const
{
- return std::min(leftover_rightcol_y(), leftover_leftcol_y());
+ return min(leftover_rightcol_y(), leftover_leftcol_y());
}
};
@@ -214,7 +214,7 @@ class _mlist_col_layout : public _layout
}
int leftover_y() const
{
- const int top_y = std::max(std::max(viewsz.y, hudsz.y), mlistsz.y);
+ const int top_y = max(max(viewsz.y, hudsz.y), mlistsz.y);
const int height = top_y + msgsz.y;
return (termsz.y - height);
}