Skip to content

Commit

Permalink
fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lucafedeli88 committed Jul 31, 2023
1 parent 23019f2 commit 4ec14d2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Source/FieldSolver/ElectrostaticSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace ElectrostaticSolver {
*
* \param [in] potential The string value of the potential
*/
void setPotentialEB(const std::string potential) {
void setPotentialEB(const std::string& potential) {
potential_eb_str = potential;
buildParsersEB();
}
Expand Down
2 changes: 1 addition & 1 deletion Source/ablastr/utils/msg_logger/MsgLogger.H
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ namespace ablastr::utils::msg_logger
*
* @param[in] msg a Msg struct
*/
void record_msg(Msg msg);
void record_msg(const Msg& msg);

/**
* \brief This function returns a vector containing the recorded messages
Expand Down
2 changes: 1 addition & 1 deletion Source/ablastr/utils/msg_logger/MsgLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Logger::Logger() :
m_io_rank{amrex::ParallelDescriptor::IOProcessorNumber()}
{}

void Logger::record_msg(Msg msg)
void Logger::record_msg(const Msg& msg)
{
m_messages[msg]++;
}
Expand Down
12 changes: 6 additions & 6 deletions Source/ablastr/warn_manager/WarnManager.H
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ namespace ablastr::warn_manager
* @param[in] priority priority of the warning message ("medium" by default)
*/
void RecordWarning(
std::string topic,
std::string text,
WarnPriority priority = WarnPriority::medium);
const std::string& topic,
const std::string& text,
const WarnPriority& priority = WarnPriority::medium);

/**
* \brief This function prints all the warning messages collected on the present MPI rank
Expand Down Expand Up @@ -210,9 +210,9 @@ namespace ablastr::warn_manager
* @param[in] priority priority of the warning message ("medium" by default)
*/
void WMRecordWarning(
std::string topic,
std::string text,
WarnPriority priority = WarnPriority::medium);
const std::string& topic,
const std::string& text,
const WarnPriority& priority = WarnPriority::medium);
}

#endif //ABLASTR_WARN_MANAGER_H_
12 changes: 6 additions & 6 deletions Source/ablastr/warn_manager/WarnManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ WarnManager::WarnManager():
{}

void WarnManager::RecordWarning(
std::string topic,
std::string text,
WarnPriority priority)
const std::string& topic,
const std::string& text,
const WarnPriority& priority)
{
auto msg_priority = abl_msg_logger::Priority::high;
if(priority == WarnPriority::low)
Expand Down Expand Up @@ -308,9 +308,9 @@ WarnManager& ablastr::warn_manager::GetWMInstance()
}

void ablastr::warn_manager::WMRecordWarning(
std::string topic,
std::string text,
WarnPriority priority)
const std::string& topic,
const std::string& text,
const WarnPriority& priority)
{
WarnManager::GetInstance().RecordWarning(
topic, text, priority);
Expand Down

0 comments on commit 4ec14d2

Please sign in to comment.