util/CNumberParser: remove unused function ParseInt64()
This commit is contained in:
parent
4086190c80
commit
b601f4dc15
|
@ -1,22 +0,0 @@
|
|||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
// author: Max Kellermann <max.kellermann@gmail.com>
|
||||
|
||||
#include "CNumberParser.hxx"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
int64_t
|
||||
ParseInt64(std::string_view s, const char **endptr_r, int base) noexcept
|
||||
{
|
||||
char buffer[32];
|
||||
*std::copy_n(s.data(), std::min(s.size(), std::size(buffer) - 1),
|
||||
buffer) = 0;
|
||||
|
||||
char *endptr;
|
||||
const auto result = ParseInt64(buffer, &endptr, base);
|
||||
if (endptr_r != nullptr)
|
||||
*endptr_r = s.data() + (endptr - buffer);
|
||||
|
||||
return result;
|
||||
}
|
|
@ -33,17 +33,6 @@ ParseUint64(const char *p, char **endptr=nullptr, int base=10) noexcept
|
|||
return strtoull(p, endptr, base);
|
||||
}
|
||||
|
||||
static inline int64_t
|
||||
ParseInt64(const char *p, char **endptr=nullptr, int base=10) noexcept
|
||||
{
|
||||
assert(p != nullptr);
|
||||
|
||||
return strtoll(p, endptr, base);
|
||||
}
|
||||
|
||||
int64_t
|
||||
ParseInt64(std::string_view s, const char **endptr_r=nullptr, int base=10) noexcept;
|
||||
|
||||
static inline double
|
||||
ParseDouble(const char *p, char **endptr=nullptr) noexcept
|
||||
{
|
||||
|
|
|
@ -3,7 +3,6 @@ util = static_library(
|
|||
'Exception.cxx',
|
||||
'UTF8.cxx',
|
||||
'MimeType.cxx',
|
||||
'CNumberParser.cxx',
|
||||
'TruncateString.cxx',
|
||||
'StringStrip.cxx',
|
||||
'StringUtil.cxx',
|
||||
|
|
Loading…
Reference in New Issue