summaryrefslogtreecommitdiff
path: root/include/anope.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-27 15:54:21 -0400
committerAdam <Adam@anope.org>2013-09-27 19:11:02 -0400
commitb319fb089c144312ab9141d6f6469d50d9d7a1ea (patch)
treeb6da2ec3a23ff7f2da9ae6ce35d591faa6f57d72 /include/anope.h
parent17196887ad1e6f9886c6cd3109bd8ede16ae7343 (diff)
Fix compile warnings and errors found by clang
Diffstat (limited to 'include/anope.h')
-rw-r--r--include/anope.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/anope.h b/include/anope.h
index 972e49b7f..e4a654b78 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -312,7 +312,7 @@ namespace Anope
{
inline size_t operator()(const string &s) const
{
- return std::tr1::hash<std::string>()(s.lower().str());
+ return TR1NS::hash<std::string>()(s.lower().str());
}
};
@@ -320,7 +320,7 @@ namespace Anope
{
inline size_t operator()(const string &s) const
{
- return std::tr1::hash<std::string>()(s.str());
+ return TR1NS::hash<std::string>()(s.str());
}
};
@@ -334,7 +334,7 @@ namespace Anope
template<typename T> class map : public std::map<string, T, ci::less> { };
template<typename T> class multimap : public std::multimap<string, T, ci::less> { };
- template<typename T> class hash_map : public std::tr1::unordered_map<string, T, hash_ci, compare> { };
+ template<typename T> class hash_map : public TR1NS::unordered_map<string, T, hash_ci, compare> { };
static const char *const compiled = __TIME__ " " __DATE__;
@@ -716,8 +716,7 @@ template<typename T> inline void convert(const Anope::string &s, T &x, Anope::st
leftover.clear();
std::istringstream i(s.str());
char c;
- bool res = i >> x;
- if (!res)
+ if (!(i >> x))
throw ConvertException("Convert fail");
if (failIfLeftoverChars)
{