[ox/fs] Make FileAddress::getPath return a StringView
This commit is contained in:
parent
2a692fc46e
commit
3c9ce4436a
@ -96,12 +96,12 @@ class FileAddress {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Result<const char*> getPath() const noexcept {
|
constexpr Result<ox::StringView> getPath() const noexcept {
|
||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
case FileAddressType::Path:
|
case FileAddressType::Path:
|
||||||
return m_data.path;
|
return ox::StringView(m_data.path);
|
||||||
case FileAddressType::ConstPath:
|
case FileAddressType::ConstPath:
|
||||||
return m_data.constPath;
|
return ox::StringView(m_data.constPath);
|
||||||
default:
|
default:
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user