From 09e77fa146f6630c8a01f59166a572dd58a30d2e Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 27 Aug 2025 22:21:04 +0200 Subject: [common, fs] Use std::string_view instead of std::string&; inline functions that are used rarely (#330) Signed-off-by: lizzie Co-authored-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/330 Reviewed-by: crueter Co-authored-by: lizzie Co-committed-by: lizzie --- src/common/fs/path_util.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/common/fs/path_util.cpp') 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 -- cgit v1.2.3