summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-03-20 16:08:01 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-03-21 00:20:47 +0100
commit7dd5c5871da014673df453c9c8bc9053344b090d (patch)
treec0600d40ac5c771f18dd375021f934007da5f2aa /crawl-ref/source/format.cc
parent1730436e02529746fe5a69a1b1f593eec5ad53bc (diff)
downloadcrawl-ref-7dd5c5871da014673df453c9c8bc9053344b090d.tar.gz
crawl-ref-7dd5c5871da014673df453c9c8bc9053344b090d.zip
Make another bunch of functions static or deleted.
Looks like get_XXX_path and the like in files.cc could use some drastic simplification, or perhaps even a nuking and rewrite.
Diffstat (limited to 'crawl-ref/source/format.cc')
-rw-r--r--crawl-ref/source/format.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index 40c509f1e1..11286649bb 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -228,8 +228,8 @@ formatted_string::operator std::string() const
return (s);
}
-void replace_all_in_string(std::string& s, const std::string& search,
- const std::string& replace)
+static 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)
@@ -250,11 +250,11 @@ std::string formatted_string::html_dump() const
case FSOP_TEXT:
tmp = ops[i].text;
// (very) crude HTMLification
- replace_all_in_string(tmp, "&", "&amp;");
- replace_all_in_string(tmp, " ", "&nbsp;");
- replace_all_in_string(tmp, "<", "&lt;");
- replace_all_in_string(tmp, ">", "&gt;");
- replace_all_in_string(tmp, "\n", "<br>");
+ _replace_all_in_string(tmp, "&", "&amp;");
+ _replace_all_in_string(tmp, " ", "&nbsp;");
+ _replace_all_in_string(tmp, "<", "&lt;");
+ _replace_all_in_string(tmp, ">", "&gt;");
+ _replace_all_in_string(tmp, "\n", "<br>");
s += tmp;
break;
case FSOP_COLOUR: