[Bf-blender-cvs] [88d358902f5] master: Clang-Tidy: Enable readability-redundant-string-cstr
Jacques Lucke
noreply at git.blender.org
Fri Jul 3 15:55:23 CEST 2020
Commit: 88d358902f53322c81bc663651af193cb696a1c1
Author: Jacques Lucke
Date: Fri Jul 3 15:54:55 2020 +0200
Branches: master
https://developer.blender.org/rB88d358902f53322c81bc663651af193cb696a1c1
Clang-Tidy: Enable readability-redundant-string-cstr
===================================================================
M .clang-tidy
M source/blender/freestyle/intern/application/AppConfig.cpp
M source/blender/freestyle/intern/application/Controller.cpp
M source/blender/io/alembic/exporter/abc_writer_nurbs.cc
M source/blender/io/alembic/intern/abc_reader_mesh.cc
===================================================================
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;
More information about the Bf-blender-cvs
mailing list