summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-08-09 11:52:32 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-08-09 14:35:27 +0200
commit4a61b4e1c3ef69e9c138c941a127877e223cb338 (patch)
tree6e860da5ad01bfd8f7a0415c6a0878ac3e746b76 /crawl-ref/source/libutil.h
parenta4452ec129f37416926ded0cfd24ba2da10ff95a (diff)
downloadcrawl-ref-4a61b4e1c3ef69e9c138c941a127877e223cb338.tar.gz
crawl-ref-4a61b4e1c3ef69e9c138c941a127877e223cb338.zip
Fix conflicting declarations of ends_with().
For historical reasons (and a C99 misdesign), the compiler doesn't complain, but it still doesn't make it right.
Diffstat (limited to 'crawl-ref/source/libutil.h')
-rw-r--r--crawl-ref/source/libutil.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h
index 75d15b76fb..abeac9e35c 100644
--- a/crawl-ref/source/libutil.h
+++ b/crawl-ref/source/libutil.h
@@ -68,8 +68,6 @@ static inline int isaalnum(int c)
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9');
}
-bool ends_with(const std::string &s, const std::string &suffix);
-
int numcmp(const char *a, const char *b, int limit = 0);
bool numcmpstr(std::string a, std::string b);
size_t strlcpy(char *dst, const char *src, size_t n);
@@ -136,7 +134,7 @@ inline bool starts_with(const std::string &s, const std::string &prefix)
return (s.rfind(prefix, 0) != std::string::npos);
}
-inline bool ends_with(const std::string &s, const std::string &suffix)
+static inline bool ends_with(const std::string &s, const std::string &suffix)
{
if (s.length() < suffix.length())
return false;