Skip to content

Commit

Permalink
STYLE: Let Configuration directly access its own m_ParameterFileName
Browse files Browse the repository at this point in the history
Remove unnecessary calls to Get/Set member functions.
  • Loading branch information
N-Dekker committed Feb 1, 2025
1 parent 76e8744 commit 9d16a56
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Core/Configuration/elxConfiguration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ Configuration::PrintParameterFile() const
std::string params = m_ParameterFileParser->ReturnParameterFileAsString();

/** Separate clearly in log-file, before and after writing the parameter file. */
log::info_to_log_file(std::ostringstream{} << '\n'
<< "=============== start of ParameterFile: "
<< this->GetParameterFileName() << " ===============\n"
<< params << '\n'
<< "=============== end of ParameterFile: " << this->GetParameterFileName()
<< " ===============\n");
log::info_to_log_file(std::ostringstream{}
<< '\n'
<< "=============== start of ParameterFile: " << m_ParameterFileName << " ===============\n"
<< params << '\n'
<< "=============== end of ParameterFile: " << m_ParameterFileName << " ===============\n");

} // end PrintParameterFile()

Expand Down Expand Up @@ -160,12 +159,12 @@ Configuration::Initialize(const CommandLineArgumentMapType & _arg)
if (!p.empty() && tp.empty())
{
/** elastix called Initialize(). */
this->SetParameterFileName(p);
m_ParameterFileName = p;
}
else if (p.empty() && !tp.empty())
{
/** transformix called Initialize(). */
this->SetParameterFileName(tp);
m_ParameterFileName = tp;
}
else if (p.empty() && tp.empty())
{
Expand Down

0 comments on commit 9d16a56

Please # to comment.