diff options
| author | lizzie <lizzie@eden-emu.dev> | 2025-08-27 22:21:04 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-08-27 22:21:04 +0200 |
| commit | 09e77fa146f6630c8a01f59166a572dd58a30d2e (patch) | |
| tree | c70cd6e7e95bf822e0ec0ece6061cf94d29eb59e /src/common/fs/path_util.cpp | |
| parent | dae0d7bec678253bd5ee5d10690bec5ffbfab024 (diff) | |
[common, fs] Use std::string_view instead of std::string&; inline functions that are used rarely (#330)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/330
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/common/fs/path_util.cpp')
| -rw-r--r-- | src/common/fs/path_util.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index e032360961..fa1403225e 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -517,24 +517,4 @@ std::string_view GetPathWithoutTop(std::string_view path) { return path.substr(std::min(name_bck_index, name_fwd_index) + 1); } -std::string_view GetFilename(std::string_view path) { - const auto name_index = path.find_last_of("\\/"); - - if (name_index == std::string_view::npos) { - return {}; - } - - return path.substr(name_index + 1); -} - -std::string_view GetExtensionFromFilename(std::string_view name) { - const std::size_t index = name.rfind('.'); - - if (index == std::string_view::npos) { - return {}; - } - - return name.substr(index + 1); -} - } // namespace Common::FS |
