get rid of utils::StaticString
In most places this is simply replaced by `std::string_view`. We also change a few internal/private headers so they accept `std::string_view` instead of `utils::CString`.
This commit is contained in:
committed by
Mathias Agopian
parent
971df18b3c
commit
5b71274fa5
@@ -23,16 +23,6 @@
|
||||
|
||||
namespace utils {
|
||||
|
||||
int StaticString::compare(const StaticString& rhs) const noexcept {
|
||||
size_type lhs_size = size();
|
||||
size_type rhs_size = rhs.size();
|
||||
if (lhs_size < rhs_size) return -1;
|
||||
if (lhs_size > rhs_size) return 1;
|
||||
return strncmp(data(), rhs.data(), size());
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
UTILS_NOINLINE
|
||||
CString::CString(const char* cstr, size_t length) {
|
||||
if (length && cstr) {
|
||||
|
||||
Reference in New Issue
Block a user