diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/freestyle/intern/system/StringUtils.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/freestyle/intern/system/StringUtils.cpp')
-rw-r--r-- | source/blender/freestyle/intern/system/StringUtils.cpp | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp index e8c3dad5d85..027491a790f 100644 --- a/source/blender/freestyle/intern/system/StringUtils.cpp +++ b/source/blender/freestyle/intern/system/StringUtils.cpp @@ -28,35 +28,33 @@ namespace Freestyle { namespace StringUtils { -void getPathName(const string& path, const string& base, vector<string>& pathnames) +void getPathName(const string &path, const string &base, vector<string> &pathnames) { - string dir; - string res; - char cleaned[FILE_MAX]; - unsigned size = path.size(); + string dir; + string res; + char cleaned[FILE_MAX]; + unsigned size = path.size(); - pathnames.push_back(base); + pathnames.push_back(base); - for (unsigned int pos = 0, sep = path.find(Config::PATH_SEP, pos); - pos < size; - pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) - { - if (sep == (unsigned)string::npos) - sep = size; + for (unsigned int pos = 0, sep = path.find(Config::PATH_SEP, pos); pos < size; + pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) { + if (sep == (unsigned)string::npos) + sep = size; - dir = path.substr(pos, sep - pos); + dir = path.substr(pos, sep - pos); - BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); - BLI_cleanup_file(NULL, cleaned); - res = string(cleaned); + BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); + BLI_cleanup_file(NULL, cleaned); + res = string(cleaned); - if (!base.empty()) - res += Config::DIR_SEP + base; + if (!base.empty()) + res += Config::DIR_SEP + base; - pathnames.push_back(res); - } + pathnames.push_back(res); + } } -} // end of namespace StringUtils +} // end of namespace StringUtils } /* namespace Freestyle */ |