clang-tidy: use auto
Found with modernize-use-auto Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user