clang-tidy: use auto
Found with modernize-use-auto Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -843,7 +843,7 @@ unsigned Chart::burndown_size (unsigned ntasks)
|
||||
|
||||
// Choose the number from here rounded up to the nearest 10% of the next
|
||||
// highest power of 10 or half of power of 10.
|
||||
const unsigned count = (unsigned) log10 (static_cast<double>(std::numeric_limits<unsigned>::max ()));
|
||||
const auto count = (unsigned) log10 (static_cast<double>(std::numeric_limits<unsigned>::max ()));
|
||||
unsigned half = 500;
|
||||
unsigned full = 1000;
|
||||
|
||||
|
||||
@@ -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