mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 18:42:58 +02:00
Use C++11 for loops, from clang-migrate. No functional change intended
This commit is contained in:
+10
-10
@@ -53,15 +53,15 @@ class StatsReport {
|
||||
typedef std::multimap<string, V3Statistic*> ByName;
|
||||
ByName byName;
|
||||
// * is always first
|
||||
for (StatColl::iterator it = s_allStats.begin(); it != s_allStats.end(); ++it) {
|
||||
V3Statistic* repp = &(*it);
|
||||
for (auto& itr : s_allStats) {
|
||||
V3Statistic* repp = &itr;
|
||||
byName.insert(make_pair(repp->name(), repp));
|
||||
}
|
||||
|
||||
// Process duplicates
|
||||
V3Statistic* lastp = nullptr;
|
||||
for (ByName::iterator it = byName.begin(); it != byName.end(); ++it) {
|
||||
V3Statistic* repp = it->second;
|
||||
for (const auto& itr : byName) {
|
||||
V3Statistic* repp = itr.second;
|
||||
if (lastp && lastp->sumit() && lastp->printit() && lastp->name() == repp->name()
|
||||
&& lastp->stage() == repp->stage()) {
|
||||
repp->combineWith(lastp);
|
||||
@@ -76,8 +76,8 @@ class StatsReport {
|
||||
typedef std::multimap<string, const V3Statistic*> ByName;
|
||||
ByName byName;
|
||||
// * is always first
|
||||
for (StatColl::iterator it = s_allStats.begin(); it != s_allStats.end(); ++it) {
|
||||
const V3Statistic* repp = &(*it);
|
||||
for (const auto& itr : s_allStats) {
|
||||
const V3Statistic* repp = &itr;
|
||||
if (repp->stage() == "*" && repp->printit()) {
|
||||
if (maxWidth < repp->name().length()) maxWidth = repp->name().length();
|
||||
byName.insert(make_pair(repp->name(), repp));
|
||||
@@ -87,8 +87,8 @@ class StatsReport {
|
||||
// Print organized by stage
|
||||
os << "Global Statistics:\n";
|
||||
os << endl;
|
||||
for (ByName::iterator it = byName.begin(); it != byName.end(); ++it) {
|
||||
const V3Statistic* repp = it->second;
|
||||
for (const auto& itr : byName) {
|
||||
const V3Statistic* repp = itr.second;
|
||||
if (repp->perf()) continue;
|
||||
os << " " << std::left << std::setw(maxWidth) << repp->name();
|
||||
repp->dump(os);
|
||||
@@ -99,8 +99,8 @@ class StatsReport {
|
||||
// Print organized by stage
|
||||
os << "Performance Statistics:\n";
|
||||
os << endl;
|
||||
for (ByName::iterator it = byName.begin(); it != byName.end(); ++it) {
|
||||
const V3Statistic* repp = it->second;
|
||||
for (const auto& itr : byName) {
|
||||
const V3Statistic* repp = itr.second;
|
||||
if (!repp->perf()) continue;
|
||||
os << " " << std::left << std::setw(maxWidth) << repp->name();
|
||||
repp->dump(os);
|
||||
|
||||
Reference in New Issue
Block a user