tag/FixString: use class AllocatedArray

This commit is contained in:
Max Kellermann
2021-10-13 14:36:22 +02:00
parent ed7baf3ae1
commit 8e71130e8a
3 changed files with 20 additions and 24 deletions

View File

@@ -22,7 +22,7 @@
#include "Pool.hxx"
#include "FixString.hxx"
#include "Tag.hxx"
#include "util/WritableBuffer.hxx"
#include "util/AllocatedArray.hxx"
#include "util/StringView.hxx"
#include <algorithm>
@@ -217,11 +217,9 @@ TagBuilder::AddItemInternal(TagType type, StringView value) noexcept
auto f = FixTagString(value);
if (!f.IsNull())
value = { f.data, f.size };
value = { f.data(), f.size() };
AddItemUnchecked(type, value);
free(f.data);
}
void