Clang-Tidy: Enable readability-redundant-string-cstr

This commit is contained in:
Jacques Lucke 2020-07-03 15:54:55 +02:00
parent 405e6c6cc9
commit 88d358902f
5 changed files with 13 additions and 14 deletions

View File

@ -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,

View File

@ -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)

View File

@ -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;

View File

@ -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());
}

View File

@ -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;