diff options
author | Peter Powell <petpow@saberuk.com> | 2019-08-13 20:11:11 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-08-13 20:11:11 +0100 |
commit | 2d35c3396a1f00375d45b874dafb9e0bdb520a9b (patch) | |
tree | ba19a394ea07799ea94ec31da6c85646fe3bd6eb /src/hashcomp.cpp | |
parent | 0827c5c7425a17b6a569a9f706b5b3dea8fa345a (diff) |
Fix some remaining uses of ato[il].
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 4fee9fd55..ae9cf6e76 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -340,7 +340,7 @@ long irc::portparser::GetToken() if (x.empty()) return 0; - while (Overlaps(atoi(x.c_str()))) + while (Overlaps(ConvToNum<long>(x))) { if (!sep.GetToken(x)) return 0; @@ -350,8 +350,8 @@ long irc::portparser::GetToken() if (dash != std::string::npos) { std::string sbegin(x, 0, dash); - range_begin = atoi(sbegin.c_str()); - range_end = atoi(x.c_str()+dash+1); + range_begin = ConvToNum<long>(sbegin); + range_end = ConvToNum<long>(x.c_str() + dash + 1); if ((range_begin > 0) && (range_end > 0) && (range_begin < 65536) && (range_end < 65536) && (range_begin < range_end)) { @@ -361,11 +361,11 @@ long irc::portparser::GetToken() else { /* Assume its just the one port */ - return atoi(sbegin.c_str()); + return ConvToNum<long>(sbegin); } } else { - return atoi(x.c_str()); + return ConvToNum<long>(x); } } |