From d14e76806921f9a4d686ea731364242ededb735d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Apr 2020 12:02:21 +1000 Subject: Cleanup: BLI_path.h function renaming Use BLI_path_ prefix, more consistent names: BLI_parent_dir -> BLI_path_parent_dir BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists BLI_ensure_filename -> BLI_path_filename_ensure BLI_first_slash -> BLI_path_slash_find BLI_last_slash -> BLI_path_slash_rfind BLI_add_slash -> BLI_path_slash_ensure BLI_del_slash -> BLI_path_slash_rstrip BLI_path_native_slash -> BLI_path_slash_native Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`. BLI_cleanup_path -> BLI_path_normalize BLI_cleanup_dir -> BLI_path_normalize_dir BLI_cleanup_unc -> BLI_path_normalize_unc BLI_cleanup_unc16 -> BLI_path_normalize_unc16 Clarify naming for extracting, creating numbered paths: BLI_stringenc -> BLI_path_sequence_encode BLI_stringdec -> BLI_path_sequence_decode Part of T74506 proposal. --- source/blender/freestyle/intern/application/Controller.cpp | 2 +- source/blender/freestyle/intern/system/StringUtils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle') diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index f7da64624e0..c2f6796bf31 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -349,7 +349,7 @@ int Controller::LoadMesh(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph soc string basename((const char *)qfi.fileName().toAscii().data()); char cleaned[FILE_MAX]; BLI_strncpy(cleaned, iFileName, FILE_MAX); - BLI_cleanup_path(NULL, cleaned); + BLI_path_normalize(NULL, cleaned); string basename = string(cleaned); #endif diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp index 58d84010574..cd85aaaa5ff 100644 --- a/source/blender/freestyle/intern/system/StringUtils.cpp +++ b/source/blender/freestyle/intern/system/StringUtils.cpp @@ -48,7 +48,7 @@ void getPathName(const string &path, const string &base, vector &pathnam dir = path.substr(pos, sep - pos); BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); - BLI_cleanup_path(NULL, cleaned); + BLI_path_normalize(NULL, cleaned); res = string(cleaned); if (!base.empty()) { -- cgit v1.2.3