Make StringView::Empty const to fix issues with user accidentally changing the value.

This commit is contained in:
Chandler Cox
2025-07-22 22:01:55 -05:00
parent bb37f980ed
commit 6cbd40e6d8
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ StringView StringBuilder::ToStringView() const
return StringView(_data.Get(), _data.Count());
}
StringView StringView::Empty;
const StringView StringView::Empty;
StringView::StringView(const String& str)
: StringViewBase<Char>(str.Get(), str.Length())

View File

@@ -219,7 +219,7 @@ public:
/// <summary>
/// Instance of the empty string.
/// </summary>
static StringView Empty;
static const StringView Empty;
public:
/// <summary>