From ba70dc4c13ff84b51d2937f5c8ba873b061cb4c1 Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sun, 11 Feb 2024 22:27:20 +0100 Subject: Address review comments --- src/core/file_sys/fs_path_utility.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/core/file_sys/fs_path_utility.h') diff --git a/src/core/file_sys/fs_path_utility.h b/src/core/file_sys/fs_path_utility.h index 5643141f9..51418ee16 100644 --- a/src/core/file_sys/fs_path_utility.h +++ b/src/core/file_sys/fs_path_utility.h @@ -91,8 +91,12 @@ public: } #define DECLARE_PATH_FLAG_HANDLER(__WHICH__) \ - constexpr bool Is##__WHICH__##Allowed() const { return (m_value & __WHICH__##Flag) != 0; } \ - constexpr void Allow##__WHICH__() { m_value |= __WHICH__##Flag; } + constexpr bool Is##__WHICH__##Allowed() const { \ + return (m_value & __WHICH__##Flag) != 0; \ + } \ + constexpr void Allow##__WHICH__() { \ + m_value |= __WHICH__##Flag; \ + } DECLARE_PATH_FLAG_HANDLER(WindowsPath) DECLARE_PATH_FLAG_HANDLER(RelativePath) @@ -426,9 +430,10 @@ public: R_SUCCEED(); } - static Result Normalize(char* dst, size_t* out_len, const char* path, size_t max_out_size, - bool is_windows_path, bool is_drive_relative_path, - bool allow_all_characters = false) { + static constexpr Result Normalize(char* dst, size_t* out_len, const char* path, + size_t max_out_size, bool is_windows_path, + bool is_drive_relative_path, + bool allow_all_characters = false) { // Use StringTraits names for remainder of scope using namespace StringTraits; -- cgit v1.2.3