summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/format.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-04-01 14:54:03 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-04-01 14:54:03 +0200
commit3432fb2a506aa25ea955c8a53454fd3b563b9e31 (patch)
tree26365685f66d543fac412fde6a922420c3bcda99 /crawl-ref/source/format.cc
parent5ae1524b45d8b53231d7bed0cf3b22cec35e70ce (diff)
downloadcrawl-ref-3432fb2a506aa25ea955c8a53454fd3b563b9e31.tar.gz
crawl-ref-3432fb2a506aa25ea955c8a53454fd3b563b9e31.zip
Make a function static.
tagged_string_tag_length() is used just once, too -- duplicating code that's done in different ways elsewhere. A candidate for clean-up.
Diffstat (limited to 'crawl-ref/source/format.cc')
-rw-r--r--crawl-ref/source/format.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/format.cc b/crawl-ref/source/format.cc
index c4a32949bc..b726fa2005 100644
--- a/crawl-ref/source/format.cc
+++ b/crawl-ref/source/format.cc
@@ -581,7 +581,7 @@ std::string tagged_string_substr(const std::string& s, int start, int end)
_find_string_location(s, end)));
}
-int tagged_string_printable_length(const std::string& s)
+static int _tagged_string_printable_length(const std::string& s)
{
int len = 0;
bool in_tag = false;
@@ -621,5 +621,5 @@ int tagged_string_printable_length(const std::string& s)
// Count the length of the tags in the string.
int tagged_string_tag_length(const std::string& s)
{
- return s.size() - tagged_string_printable_length(s);
+ return s.size() - _tagged_string_printable_length(s);
}