Skip to content

Commit ff7cfbc

Browse files
committed
sonar fixes
1 parent 924544f commit ff7cfbc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Plugins/FpeMonitoring/src/FpeMonitor.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ void FpeMonitor::Result::add(FpeType type, void *stackPtr,
8888
auto st = std::make_unique<boost::stacktrace::stacktrace>(
8989
boost::stacktrace::stacktrace::from_dump(stackPtr, bufferSize));
9090

91-
for (std::size_t i = 0; i < m_stackTraces.size(); ++i) {
92-
auto &el = m_stackTraces[i];
91+
for (auto &el : m_stackTraces) {
9392
if (canMergeFpeInfo(el, type, location, *st)) {
9493
el.count += 1;
9594
return;
9695
}
9796
}
9897

99-
m_stackTraces.push_back({1, type, std::move(st), location});
98+
m_stackTraces.emplace_back(1, type, std::move(st), location);
10099
}
101100

102101
bool FpeMonitor::Result::contains(const FpeInfo &info) const {
@@ -173,7 +172,7 @@ void FpeMonitor::Result::deduplicate() {
173172
if (mergeTarget != m_stackTraces.end()) {
174173
mergeTarget->count += info.count;
175174
} else {
176-
m_stackTraces.push_back(std::move(info));
175+
m_stackTraces.push_back(info);
177176
}
178177
}
179178
}

0 commit comments

Comments
 (0)