[Bf-blender-cvs] [509e0c5b767] master: Cleanup: BLI_path_slash_native: use separator defines instead of literal values.
Bastien Montagne
noreply at git.blender.org
Thu Jun 10 18:40:28 CEST 2021
Commit: 509e0c5b7677f4c2fdde264ccc5f376c1505219d
Author: Bastien Montagne
Date: Thu Jun 10 18:35:35 2021 +0200
Branches: master
https://developer.blender.org/rB509e0c5b7677f4c2fdde264ccc5f376c1505219d
Cleanup: BLI_path_slash_native: use separator defines instead of literal values.
Even though this function is alredy using system-specific code, it's
still cleaner to use `SEP` and `ALTSEP` here.
===================================================================
M source/blender/blenlib/intern/path_util.c
===================================================================
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index cb6cce30f92..e8027836ed6 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -2013,9 +2013,9 @@ void BLI_path_slash_native(char *path)
{
#ifdef WIN32
if (path && BLI_strnlen(path, 3) > 2) {
- BLI_str_replace_char(path + 2, '/', '\\');
+ BLI_str_replace_char(path + 2, ALTSEP, SEP);
}
#else
- BLI_str_replace_char(path + BLI_path_unc_prefix_len(path), '\\', '/');
+ BLI_str_replace_char(path + BLI_path_unc_prefix_len(path), ALTSEP, SEP);
#endif
}
More information about the Bf-blender-cvs
mailing list