Skip to content

Commit

Permalink
Prevent duplication of log columns.
Browse files Browse the repository at this point in the history
Duplication becomes problematic with multiple runs, e.g. in MPC.
  • Loading branch information
abussy-aldebaran committed Feb 5, 2025
1 parent 3a23ac0 commit fd36876
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ void Logger::finish(bool conv) {

void Logger::addColumn(std::string_view name, uint width,
std::string_view format) {
m_colNames.push_back(name);
if (std::find(m_colNames.begin(), m_colNames.end(), name) == m_colNames.end())
m_colNames.push_back(name);
m_colSpecs[name] = {width, std::string(format)};
}

Expand Down

0 comments on commit fd36876

Please sign in to comment.