util/StringView: remove methods SetEmpty(), Empty()
This commit is contained in:
parent
ebdb7c8de2
commit
96b557c1f0
@ -230,7 +230,7 @@ void
|
|||||||
TagBuilder::AddEmptyItem(TagType type)
|
TagBuilder::AddEmptyItem(TagType type)
|
||||||
{
|
{
|
||||||
tag_pool_lock.lock();
|
tag_pool_lock.lock();
|
||||||
auto i = tag_pool_get_item(type, StringView::Empty());
|
auto i = tag_pool_get_item(type, "");
|
||||||
tag_pool_lock.unlock();
|
tag_pool_lock.unlock();
|
||||||
|
|
||||||
items.push_back(i);
|
items.push_back(i);
|
||||||
|
@ -49,15 +49,6 @@ struct StringView : ConstBuffer<char> {
|
|||||||
constexpr StringView(std::nullptr_t n) noexcept
|
constexpr StringView(std::nullptr_t n) noexcept
|
||||||
:ConstBuffer(n) {}
|
:ConstBuffer(n) {}
|
||||||
|
|
||||||
static constexpr StringView Empty() noexcept {
|
|
||||||
return StringView("", size_t(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetEmpty() noexcept {
|
|
||||||
data = "";
|
|
||||||
size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
gcc_pure
|
gcc_pure
|
||||||
pointer_type Find(value_type ch) const noexcept {
|
pointer_type Find(value_type ch) const noexcept {
|
||||||
return StringFind(data, ch, size);
|
return StringFind(data, ch, size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user