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:
Mathias Agopian
2022-08-01 14:16:14 -07:00
committed by Mathias Agopian
parent 971df18b3c
commit 5b71274fa5
28 changed files with 155 additions and 340 deletions

View File

@@ -25,21 +25,6 @@ TEST(CString, EmptyString) {
EXPECT_STREQ("", emptyString.c_str_safe());
}
TEST(StaticString, hash) {
StaticString a("Hello World!");
StaticString b = StaticString::make("Hello World!");
StaticString c("Hello World");
StaticString d("Hello World!");
EXPECT_EQ(a.getHash(), b.getHash());
EXPECT_EQ(a.getHash(), d.getHash());
EXPECT_NE(a.getHash(), c.getHash());
EXPECT_NE(b.getHash(), c.getHash());
StaticString::Hasher ha;
EXPECT_EQ(ha(a), a.getHash());
}
TEST(CString, Replace) {
{
CString str("foo bar baz");