clang-tidy: use auto

Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2021-02-28 19:39:31 -08:00
committed by Tomas Babej
parent d0c4350c2f
commit e84930be8d
4 changed files with 16 additions and 16 deletions

View File

@@ -107,7 +107,7 @@ int CmdImport::import (const std::string& input)
if (root->type () == json::j_object)
{
// For each object element...
json::object* root_obj = (json::object*)root;
auto root_obj = (json::object*)root;
importSingleTask (root_obj);
++count;
}
@@ -116,13 +116,13 @@ int CmdImport::import (const std::string& input)
// [ { ... } , { ... } ]
else if (root->type () == json::j_array)
{
json::array* root_arr = (json::array*)root;
auto root_arr = (json::array*)root;
// For each object element...
for (auto& element : root_arr->_data)
{
// For each object element...
json::object* root_obj = (json::object*)element;
auto root_obj = (json::object*)element;
importSingleTask (root_obj);
++count;
}