summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-10-15 01:55:59 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-10-15 01:55:59 +0200
commit555734fcd3aef4c83605d70d0456dda28b7b5ace (patch)
tree9c34fe5bc58d5f3d4c0a7622045adc7aa1d17a98 /crawl-ref/source/format.cc
parentacf5187334f2cfb983a1a8de07d1e77f73e4283a (diff)
downloadcrawl-ref-555734fcd3aef4c83605d70d0456dda28b7b5ace.tar.gz
crawl-ref-555734fcd3aef4c83605d70d0456dda28b7b5ace.zip
Massive spacing fixes: "( spaces after parentheses )".
I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
Diffstat (limited to 'crawl-ref/source/format.cc')
-rw-r--r--crawl-ref/source/format.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index c02371a29c..59d6eb0a38 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -237,7 +237,7 @@ void replace_all_in_string(std::string& s, const std::string& search,
const std::string& replace)
{
std::string::size_type pos = 0;
- while ( (pos = s.find(search, pos)) != std::string::npos )
+ while ((pos = s.find(search, pos)) != std::string::npos)
{
s.replace(pos, search.size(), replace);
pos += replace.size();
@@ -428,7 +428,7 @@ formatted_string formatted_string::substr(size_t start, size_t substr_length) co
result.ops.push_back(ops[last_FSOP_COLOUR]);
// Copy the text
- for ( ; i<ops.size(); i++)
+ for (; i<ops.size(); i++)
{
const fs_op& op = ops[i];
if (op.type == FSOP_TEXT)
@@ -462,7 +462,7 @@ void formatted_string::add_glyph(glyph g)
void formatted_string::textcolor(int color)
{
if (!ops.empty() && ops[ ops.size() - 1 ].type == FSOP_COLOUR)
- ops.erase( ops.end() - 1 );
+ ops.erase(ops.end() - 1);
ops.push_back(color);
}
@@ -520,10 +520,10 @@ int count_linebreaks(const formatted_string& fs)
std::string::size_type where = 0;
const std::string s = fs;
int count = 0;
- while ( 1 )
+ while (1)
{
where = s.find("\n", where);
- if ( where == std::string::npos )
+ if (where == std::string::npos)
break;
else
{