Make StringView::Empty const to fix issues with user accidentally changing the value.
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
/// <summary>
|
||||
/// Instance of the empty string.
|
||||
/// </summary>
|
||||
static StringView Empty;
|
||||
static const StringView Empty;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user