diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-03 16:54:55 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-03 16:55:09 +0300 |
commit | 88d358902f53322c81bc663651af193cb696a1c1 (patch) | |
tree | 711dc7e37cacdf74bcc8a961260ce38d2fa1f4c2 | |
parent | 405e6c6cc93cb8fafe33f9162c1832caf5e129f3 (diff) |
Clang-Tidy: Enable readability-redundant-string-cstr
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | source/blender/freestyle/intern/application/AppConfig.cpp | 20 | ||||
-rw-r--r-- | source/blender/freestyle/intern/application/Controller.cpp | 2 | ||||
-rw-r--r-- | source/blender/io/alembic/exporter/abc_writer_nurbs.cc | 2 | ||||
-rw-r--r-- | source/blender/io/alembic/intern/abc_reader_mesh.cc | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/.clang-tidy b/.clang-tidy index 385c7de7260..0d293156fec 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -24,7 +24,6 @@ Checks: > -readability-redundant-string-init, -readability-redundant-member-init, -readability-const-return-type, - -readability-redundant-string-cstr, -readability-static-accessed-through-instance, -readability-redundant-declaration, -readability-qualified-auto, diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp index a2f0a3395af..b97843e045d 100644 --- a/source/blender/freestyle/intern/application/AppConfig.cpp +++ b/source/blender/freestyle/intern/application/AppConfig.cpp @@ -46,17 +46,17 @@ Path::Path() void Path::setRootDir(const string &iRootDir) { - _ProjectDir = iRootDir + string(DIR_SEP.c_str()) + "freestyle"; + _ProjectDir = iRootDir + string(DIR_SEP) + "freestyle"; _ModelsPath = ""; - _PatternsPath = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + - "textures" + string(DIR_SEP.c_str()) + "variation_patterns" + - string(DIR_SEP.c_str()); - _BrushesPath = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + - "textures" + string(DIR_SEP.c_str()) + "brushes" + string(DIR_SEP.c_str()); - _EnvMapDir = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + - "env_map" + string(DIR_SEP.c_str()); - _MapsDir = _ProjectDir + string(DIR_SEP.c_str()) + "data" + string(DIR_SEP.c_str()) + "maps" + - string(DIR_SEP.c_str()); + _PatternsPath = _ProjectDir + string(DIR_SEP) + "data" + string(DIR_SEP) + + "textures" + string(DIR_SEP) + "variation_patterns" + + string(DIR_SEP); + _BrushesPath = _ProjectDir + string(DIR_SEP) + "data" + string(DIR_SEP) + + "textures" + string(DIR_SEP) + "brushes" + string(DIR_SEP); + _EnvMapDir = _ProjectDir + string(DIR_SEP) + "data" + string(DIR_SEP) + + "env_map" + string(DIR_SEP); + _MapsDir = _ProjectDir + string(DIR_SEP) + "data" + string(DIR_SEP) + "maps" + + string(DIR_SEP); } void Path::setHomeDir(const string &iHomeDir) diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index dfe78eaf10c..f9edadb2d4a 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -74,7 +74,7 @@ namespace Freestyle { Controller::Controller() { - const string sep(Config::DIR_SEP.c_str()); + const string sep(Config::DIR_SEP); #if 0 const string filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR + sep + Config::OPTIONS_CURRENT_DIRS_FILE; diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc index 1fd382214a6..14cb7773e67 100644 --- a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc +++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc @@ -64,7 +64,7 @@ void ABCNurbsWriter::create_alembic_objects(const HierarchyContext *context) std::string patch_name = patch_name_stream.str(); CLOG_INFO(&LOG, 2, "exporting %s/%s", abc_parent_path, patch_name.c_str()); - ONuPatch nurbs(abc_parent, patch_name.c_str(), timesample_index_); + ONuPatch nurbs(abc_parent, patch_name, timesample_index_); abc_nurbs_.push_back(nurbs); abc_nurbs_schemas_.push_back(nurbs.getSchema()); } diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index 756dde3783c..98130eb28cd 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -104,7 +104,7 @@ static void assign_materials(Main *bmain, for (; it != mat_index_map.end(); ++it) { std::string mat_name = it->first; - mat_iter = mat_map.find(mat_name.c_str()); + mat_iter = mat_map.find(mat_name); Material *assigned_mat; |