aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/fs_path_utility.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-19 10:50:45 -0500
committerGitHub <noreply@github.com>2024-02-19 10:50:45 -0500
commitc9ef2e26ca82cacc44998727d704f4b77ee88591 (patch)
tree43a5699123e4930560fc5016faac7efb15b63f4e /src/core/file_sys/fs_path_utility.h
parent58c7e846cbc1aaab3d7309712b9c68eef3633315 (diff)
parent310c1f50beb77fc5c6f9075029973161d4e51a4a (diff)
Merge pull request #13080 from FearlessTobi/scope-exit
scope_exit: Make constexpr
Diffstat (limited to 'src/core/file_sys/fs_path_utility.h')
-rw-r--r--src/core/file_sys/fs_path_utility.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/file_sys/fs_path_utility.h b/src/core/file_sys/fs_path_utility.h
index e9011d065..5643141f9 100644
--- a/src/core/file_sys/fs_path_utility.h
+++ b/src/core/file_sys/fs_path_utility.h
@@ -447,7 +447,7 @@ public:
char* replacement_path = nullptr;
size_t replacement_path_size = 0;
- SCOPE_EXIT({
+ SCOPE_EXIT {
if (replacement_path != nullptr) {
if (std::is_constant_evaluated()) {
delete[] replacement_path;
@@ -455,7 +455,7 @@ public:
Deallocate(replacement_path, replacement_path_size);
}
}
- });
+ };
// Perform path replacement, if necessary
if (IsParentDirectoryPathReplacementNeeded(cur_path)) {
@@ -1102,8 +1102,8 @@ public:
R_SUCCEED();
}
- static Result Normalize(char* dst, size_t dst_size, const char* path, size_t path_len,
- const PathFlags& flags) {
+ static constexpr Result Normalize(char* dst, size_t dst_size, const char* path, size_t path_len,
+ const PathFlags& flags) {
// Use StringTraits names for remainder of scope
using namespace StringTraits;
@@ -1199,7 +1199,7 @@ public:
const size_t replaced_src_len = path_len - (src - path);
char* replaced_src = nullptr;
- SCOPE_EXIT({
+ SCOPE_EXIT {
if (replaced_src != nullptr) {
if (std::is_constant_evaluated()) {
delete[] replaced_src;
@@ -1207,7 +1207,7 @@ public:
Deallocate(replaced_src, replaced_src_len);
}
}
- });
+ };
if (std::is_constant_evaluated()) {
replaced_src = new char[replaced_src_len];