Commit 988680de authored by Max Kellermann's avatar Max Kellermann

util/StringView: remove unnecessary operator= overloads

These will be generated by the compiler automatically.
parent cdf92c63
...@@ -64,18 +64,6 @@ struct StringView : ConstBuffer<char> { ...@@ -64,18 +64,6 @@ struct StringView : ConstBuffer<char> {
return (pointer_type)memchr(data, ch, size); return (pointer_type)memchr(data, ch, size);
} }
StringView &operator=(std::nullptr_t) noexcept {
data = nullptr;
size = 0;
return *this;
}
StringView &operator=(pointer_type _data) noexcept {
data = _data;
size = _data != nullptr ? strlen(_data) : 0;
return *this;
}
gcc_pure gcc_pure
bool StartsWith(StringView needle) const noexcept { bool StartsWith(StringView needle) const noexcept {
return size >= needle.size && return size >= needle.size &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment