From 3c9ce4436aa3cf6f01488af1a09c1285490ded55 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 30 Nov 2023 01:01:01 -0600 Subject: [PATCH] [ox/fs] Make FileAddress::getPath return a StringView --- deps/ox/src/ox/fs/filesystem/filelocation.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.hpp b/deps/ox/src/ox/fs/filesystem/filelocation.hpp index b0cf5a73..2d512e31 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.hpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.hpp @@ -96,12 +96,12 @@ class FileAddress { } } - constexpr Result getPath() const noexcept { + constexpr Result 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); }