util/StringView: remove methods SetEmpty(), Empty()

This commit is contained in:
Max Kellermann 2017-09-12 17:06:07 +02:00
parent ebdb7c8de2
commit 96b557c1f0
2 changed files with 1 additions and 10 deletions

View File

@ -230,7 +230,7 @@ void
TagBuilder::AddEmptyItem(TagType type)
{
tag_pool_lock.lock();
auto i = tag_pool_get_item(type, StringView::Empty());
auto i = tag_pool_get_item(type, "");
tag_pool_lock.unlock();
items.push_back(i);

View File

@ -49,15 +49,6 @@ struct StringView : ConstBuffer<char> {
constexpr StringView(std::nullptr_t n) noexcept
:ConstBuffer(n) {}
static constexpr StringView Empty() noexcept {
return StringView("", size_t(0));
}
void SetEmpty() noexcept {
data = "";
size = 0;
}
gcc_pure
pointer_type Find(value_type ch) const noexcept {
return StringFind(data, ch, size);