Skip to content

Commit 49a39f5

Browse files
committed
PR feedback
1 parent ff7cfbc commit 49a39f5

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Plugins/FpeMonitoring/include/ActsPlugins/FpeMonitoring/FpeMonitor.hpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,14 @@ class FpeMonitor {
241241

242242
Buffer m_buffer{65536};
243243

244-
boost::container::static_vector<
245-
std::tuple<FpeType, void *, std::size_t, std::uintptr_t>, 128>
246-
m_recorded;
244+
struct Recorded {
245+
FpeType type;
246+
void *stackPtr;
247+
std::size_t bufferSize;
248+
std::uintptr_t location;
249+
};
250+
251+
boost::container::static_vector<Recorded, 128> m_recorded;
247252
};
248253

249254
/// @}

Plugins/FpeMonitoring/src/FpeMonitor.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ void FpeMonitor::consumeRecorded() {
114114
return;
115115
}
116116

117-
for (auto [type, stackPtr, remaining, location] : m_recorded) {
118-
m_result.add(type, stackPtr, remaining, location);
117+
for (const auto &recorded : m_recorded) {
118+
m_result.add(recorded.type, recorded.stackPtr, recorded.bufferSize,
119+
recorded.location);
119120
}
120121

121122
m_buffer.reset();
@@ -163,7 +164,7 @@ void FpeMonitor::Result::deduplicate() {
163164
m_stackTraces.clear();
164165
m_stackTraces.reserve(copy.size());
165166

166-
for (auto &info : copy) {
167+
for (const auto &info : copy) {
167168
const auto mergeTarget =
168169
std::ranges::find_if(m_stackTraces, [&](const FpeInfo &existing) {
169170
return canMergeFpeInfo(existing, info.type, info.location, *info.st);

0 commit comments

Comments
 (0)