summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-06 19:19:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-06 19:19:35 +0000
commitc7116e761c1805b3991509f50f87b89eaad3a857 (patch)
tree06aec90cff3983dff786681477bd62e44eec6ba3 /crawl-ref/source/menu.cc
parentd73eb4aaefb38e2aac5a8b20ed5da7619526c034 (diff)
downloadcrawl-ref-c7116e761c1805b3991509f50f87b89eaad3a857.tar.gz
crawl-ref-c7116e761c1805b3991509f50f87b89eaad3a857.zip
Apply r9904 to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9905 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/menu.cc')
-rw-r--r--crawl-ref/source/menu.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index e4c5a6dc6a..e2a907f5f0 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -1347,7 +1347,7 @@ void slider_menu::new_selection(int nsel)
{
if (nsel < 0)
{
- if ( !is_set(MF_NOWRAP) )
+ if (!is_set(MF_NOWRAP))
{
do
{
@@ -1360,7 +1360,7 @@ void slider_menu::new_selection(int nsel)
}
if (nsel >= static_cast<int>(items.size()))
{
- if ( !is_set(MF_NOWRAP) )
+ if (!is_set(MF_NOWRAP))
{
do
{
@@ -1620,12 +1620,12 @@ int linebreak_string( std::string& s, int wrapcol, int maxcol )
size_t loc = 0;
int xpos = 0;
int breakcount = 0;
- while ( loc < s.size() )
+ while (loc < s.size())
{
- if ( s[loc] == '<' ) // tag
+ if (s[loc] == '<') // tag
{
// << escape
- if ( loc + 1 < s.size() && s[loc+1] == '<' )
+ if (loc + 1 < s.size() && s[loc+1] == '<')
{
++xpos;
loc += 2;
@@ -1633,24 +1633,24 @@ int linebreak_string( std::string& s, int wrapcol, int maxcol )
continue;
}
// skip tag
- while ( loc < s.size() && s[loc] != '>' )
+ while (loc < s.size() && s[loc] != '>')
++loc;
++loc;
}
else
{
// user-forced newline
- if ( s[loc] == '\n' )
+ if (s[loc] == '\n')
xpos = 0;
// soft linebreak
- else if ( s[loc] == ' ' && xpos > wrapcol )
+ else if (s[loc] == ' ' && xpos > wrapcol)
{
s.replace(loc, 1, "\n");
xpos = 0;
++breakcount;
}
// hard linebreak
- else if ( xpos > maxcol )
+ else if (xpos > maxcol)
{
s.insert(loc, "\n");
xpos = 0;
@@ -1691,7 +1691,7 @@ int linebreak_string2( std::string& s, int maxcol )
else
{
// user-forced newline, or one we just stuffed in
- if ( s[loc] == '\n' )
+ if (s[loc] == '\n')
{
xpos = 0;
spaceloc = 0;
@@ -1700,7 +1700,7 @@ int linebreak_string2( std::string& s, int maxcol )
}
// force a wrap?
- if ( xpos >= maxcol )
+ if (xpos >= maxcol)
{
if (spaceloc)
{
@@ -1717,7 +1717,7 @@ int linebreak_string2( std::string& s, int maxcol )
}
// save possible linebreak location
- if ( s[loc] == ' ' && xpos > 0)
+ if (s[loc] == ' ' && xpos > 0)
{
spaceloc = loc;
}