Enable more clang-tidy checks. (#6270)

* Enable more clang-tidy checks
This commit is contained in:
Siarhei Fedartsou
2022-06-30 15:32:12 +02:00
committed by GitHub
parent 59953172e8
commit 3d2db20777
35 changed files with 69 additions and 79 deletions
+4 -3
View File
@@ -18,8 +18,9 @@ struct IOConfig
IOConfig(std::vector<boost::filesystem::path> required_input_files_,
std::vector<boost::filesystem::path> optional_input_files_,
std::vector<boost::filesystem::path> output_files_)
: required_input_files(required_input_files_), optional_input_files(optional_input_files_),
output_files(output_files_)
: required_input_files(std::move(required_input_files_)),
optional_input_files(std::move(optional_input_files_)),
output_files(std::move(output_files_))
{
}
@@ -47,7 +48,7 @@ struct IOConfig
std::array<std::string, 6> known_extensions{
{".osm.bz2", ".osm.pbf", ".osm.xml", ".pbf", ".osm", ".osrm"}};
for (auto ext : known_extensions)
for (const auto &ext : known_extensions)
{
const auto pos = path.find(ext);
if (pos != std::string::npos)
+1 -1
View File
@@ -36,7 +36,7 @@ inline std::string trimName(const std::string &name_prefix, const std::string &n
// list directory and
if (!name_prefix.empty() && name_prefix.back() == '/')
{
auto directory_position = name.find_first_of("/", name_prefix.length());
auto directory_position = name.find_first_of('/', name_prefix.length());
// this is a "file" in the directory of name_prefix
if (directory_position == std::string::npos)
{