summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-07-05 12:14:09 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-07-05 12:14:09 +0200
commitc41419c4f47bbf0737d3fedf58128c835d2c4e3b (patch)
tree764ae18c107df39fd90af718922036bd245561ca /crawl-ref/source/format.cc
parentb80adef8882143cad34f3c8bcc9a8ccbd4440223 (diff)
downloadcrawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.tar.gz
crawl-ref-c41419c4f47bbf0737d3fedf58128c835d2c4e3b.zip
Drop parentheses around scalar values in "return".
Diffstat (limited to 'crawl-ref/source/format.cc')
-rw-r--r--crawl-ref/source/format.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index 0f87f33b7c..db017e00ca 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -28,10 +28,10 @@ formatted_string::formatted_string(const std::string &s, int init_colour)
int formatted_string::get_colour(const std::string &tag)
{
if (tag == "h")
- return (YELLOW);
+ return YELLOW;
if (tag == "w")
- return (WHITE);
+ return WHITE;
const int colour = str_to_colour(tag);
return (colour != -1? colour : LIGHTGREY);
@@ -226,7 +226,7 @@ formatted_string::operator std::string() const
if (ops[i] == FSOP_TEXT)
s += ops[i].text;
}
- return (s);
+ return s;
}
static void _replace_all_in_string(std::string& s, const std::string& search,
@@ -287,7 +287,7 @@ int formatted_string::width() const
for (unsigned i = 0, size = ops.size(); i < size; ++i)
if (ops[i] == FSOP_TEXT)
len += strwidth(ops[i].text);
- return (len);
+ return len;
}
inline void cap(int &i, int max)
@@ -389,7 +389,7 @@ int formatted_string::find_last_colour() const
if (ops[i].type == FSOP_COLOUR)
return (ops[i].x);
}
- return (LIGHTGREY);
+ return LIGHTGREY;
}
formatted_string formatted_string::chop(int length) const
@@ -562,7 +562,7 @@ static int _tagged_string_printable_length(const std::string& s)
else // normal, printable character
++len;
}
- return (len);
+ return len;
}