[ox/fs] Make FileAddress::getPath return a StringView

(synced from 3c9ce4436a)
This commit is contained in:
2023-11-30 01:01:01 -06:00
parent 6c71a571b1
commit b9cda0b2b4
+3 -3
View File
@@ -96,12 +96,12 @@ class FileAddress {
}
}
constexpr Result<const char*> getPath() const noexcept {
constexpr Result<ox::StringView> getPath() const noexcept {
switch (m_type) {
case FileAddressType::Path:
return m_data.path;
return ox::StringView(m_data.path);
case FileAddressType::ConstPath:
return m_data.constPath;
return ox::StringView(m_data.constPath);
default:
return OxError(1);
}