Skip to content

Commit

Permalink
STYLE: Remove == true from Boolean expressions
Browse files Browse the repository at this point in the history
Follow-up to ITK pull request InsightSoftwareConsortium/ITK#4502 commit InsightSoftwareConsortium/ITK@e7a60b6

Following C++ Core Guidelines, February 15, 2024, "Don’t add redundant `==` or `!=` to conditions", http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es87-dont-add-redundant--or--to-conditions
  • Loading branch information
N-Dekker committed Apr 9, 2024
1 parent 095ebcc commit 3dc2c47
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ StatisticalShapePointPenalty<TFixedPointSet, TMovingPointSet>::Initialize()
}
case 1: // decomposed covariance (uniform regularization)
{
if (this->m_NormalizedShapeModel == true)
if (this->m_NormalizedShapeModel)
{
itkExceptionMacro("ShapeModelCalculation option 1 is only implemented for NormalizedShapeModel = false");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ AdaptiveStochasticGradientDescent<TElastix>::AutomaticParameterEstimationUsingDi
configuration.ReadParameter(this->m_UseNoiseCompensation, "NoiseCompensation", this->GetComponentLabel(), 0, 0);

/** Use noise compensation factor or not. */
if (this->m_UseNoiseCompensation == true)
if (this->m_UseNoiseCompensation)
{
double sigma4 = 0.0;
double gg = 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ AdaptiveStochasticLBFGS<TElastix>::AutomaticParameterEstimationUsingDisplacement
configuration.ReadParameter(this->m_UseNoiseCompensation, "NoiseCompensation", this->GetComponentLabel(), 0, 0);

/** Use noise Compensation factor or not. */
if (this->m_UseNoiseCompensation == true)
if (this->m_UseNoiseCompensation)
{
double sigma4 = 0.0;
double gg = 0.0;
Expand Down Expand Up @@ -1231,7 +1231,7 @@ AdaptiveStochasticLBFGS<TElastix>::AutomaticLBFGSStepsizeEstimation()
configuration.ReadParameter(this->m_UseNoiseCompensation, "NoiseCompensation", this->GetComponentLabel(), 0, 0);

/** Use noise Compensation factor or not. */
if (this->m_UseNoiseCompensation == true)
if (this->m_UseNoiseCompensation)
{
/** This use the time t_k = 0. */
a = delta * std::pow(A + 1.0, alpha) / jacg * this->m_NoiseFactor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ AdaptiveStochasticVarianceReducedGradient<TElastix>::AutomaticParameterEstimatio
configuration.ReadParameter(this->m_UseNoiseCompensation, "NoiseCompensation", this->GetComponentLabel(), 0, 0);

/** Use noise Compensation factor or not. */
if (this->m_UseNoiseCompensation == true)
if (this->m_UseNoiseCompensation)
{
double sigma4 = 0.0;
double gg = 0.0;
Expand Down

0 comments on commit 3dc2c47

Please sign in to comment.