Skip to content

Commit 174cd89

Browse files
committed
Disable bugprone-easily-swappable-parameters
1 parent f8ae3be commit 174cd89

File tree

6 files changed

+13
-23
lines changed

6 files changed

+13
-23
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Checks: >
1212
performance-*,
1313
portability-*,
1414
readability-*,
15+
-bugprone-easily-swappable-parameters,
1516
-modernize-use-trailing-return-type,
1617
-readability-identifier-length
1718

src/cart_cell.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ real_t CartCell::GetTargetTotalVolume() const {
6767
// volume (and proportions) smoothly toward a desired target volume over time
6868
// whe the cell is apoptotic. The relaxations rate controls the speed of
6969
// convergence
70-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
7170
void CartCell::ChangeVolumeExponentialRelaxationEquation(
72-
real_t relaxation_rate_cytoplasm, real_t relaxation_rate_nucleus, // NOLINT
71+
real_t relaxation_rate_cytoplasm, real_t relaxation_rate_nucleus,
7372
real_t relaxation_rate_fluid) {
7473
// Exponential relaxation towards the target volume
7574
const real_t current_total_volume = GetVolume();
@@ -189,7 +188,6 @@ Real3 CartCell::CalculateDisplacement(const InteractionForce* force,
189188

190189
// Compute new oxygen or immunostimulatory factor concentration after
191190
// consumption/ secretion
192-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
193191
real_t CartCell::ConsumeSecreteSubstance(int substance_id,
194192
real_t old_concentration) {
195193
real_t res = NAN; // NOLINT
@@ -307,4 +305,4 @@ void StateControlCart::Run(Agent* agent) {
307305
}
308306
}
309307

310-
} // namespace bdm
308+
} // namespace bdm

src/cart_cell.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ class CartCell : public Cell {
151151
/// @param relaxation_rate_fluid Relaxation rate for fluid volume changes
152152
void ChangeVolumeExponentialRelaxationEquation(
153153
real_t relaxation_rate_cytoplasm, real_t relaxation_rate_nucleus,
154-
real_t
155-
relaxation_rate_fluid); // NOLINT(bugprone-easily-swappable-parameters)
154+
real_t relaxation_rate_fluid);
156155

157156
/// Calculate displacement of the cell
158157
///

src/cart_tumor.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ int Simulate(int argc, const char** argv) {
117117
kImmunostimulatoryFactor, BoundaryConditionType::kNeumann, nullptr);
118118

119119
// Initialize oxygen voxels
120-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
121120
ModelInitializer::InitializeSubstance(kOxygen, [](real_t /*x*/, real_t /*y*/,
122121
real_t /*z*/) {
123122
return kInitialOxygenLevel; // Set all voxels to kInitialOxygenLevel mmHg
@@ -152,4 +151,4 @@ int Simulate(int argc, const char** argv) {
152151

153152
} // namespace bdm
154153

155-
int main(int argc, const char** argv) { return bdm::Simulate(argc, argv); }
154+
int main(int argc, const char** argv) { return bdm::Simulate(argc, argv); }

src/diffusion_thomas_algorithm.cc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@
3636

3737
namespace bdm {
3838

39-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
40-
DiffusionThomasAlgorithm::DiffusionThomasAlgorithm(
41-
int substance_id, // NOLINT
42-
std::string substance_name, // NOLINT
43-
real_t dc, real_t mu, // NOLINT
44-
real_t resolution, real_t dt, // NOLINT
45-
bool dirichlet_border) // NOLINT
39+
DiffusionThomasAlgorithm::DiffusionThomasAlgorithm(int substance_id,
40+
std::string substance_name,
41+
real_t dc, real_t mu,
42+
real_t resolution, real_t dt,
43+
bool dirichlet_border)
4644
: DiffusionGrid(substance_id, std::move(substance_name), dc, mu,
4745
static_cast<int>(
4846
resolution)), // Added cast for consistency with parent
@@ -267,7 +265,6 @@ void DiffusionThomasAlgorithm::SolveDirectionThomas(unsigned int direction) {
267265
}
268266
}
269267

270-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
271268
void DiffusionThomasAlgorithm::ForwardElimination(
272269
unsigned int direction, unsigned int outer, unsigned int middle,
273270
const std::vector<real_t>& thomas_denom, unsigned int jump) {
@@ -288,7 +285,6 @@ void DiffusionThomasAlgorithm::ForwardElimination(
288285
}
289286
}
290287

291-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
292288
void DiffusionThomasAlgorithm::BackSubstitution(
293289
unsigned int direction, unsigned int outer, unsigned int middle,
294290
const std::vector<real_t>& thomas_c, unsigned int jump) {
@@ -306,7 +302,6 @@ void DiffusionThomasAlgorithm::BackSubstitution(
306302
}
307303
}
308304

309-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
310305
size_t DiffusionThomasAlgorithm::GetLoopIndex(unsigned int direction,
311306
unsigned int outer,
312307
unsigned int middle,
@@ -351,4 +346,4 @@ void DiffusionThomasAlgorithm::ComputeConsumptionsSecretions() {
351346
});
352347
}
353348

354-
} // namespace bdm
349+
} // namespace bdm

src/tumor_cell.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,8 @@ real_t TumorCell::GetTargetTotalVolume() const {
192192
// differential equation using a discrete update step. It is used to grow or
193193
// shrink the volume (and proportions) smoothly toward a desired target volume
194194
// over time. The relaxations rate controls the speed of convergence
195-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
196195
void TumorCell::ChangeVolumeExponentialRelaxationEquation(
197-
real_t relaxation_rate_cytoplasm, real_t relaxation_rate_nucleus, // NOLINT
196+
real_t relaxation_rate_cytoplasm, real_t relaxation_rate_nucleus,
198197
real_t relaxation_rate_fluid) {
199198
// Exponential relaxation towards the target volume
200199
const real_t current_total_volume = GetVolume();
@@ -337,7 +336,6 @@ Real3 TumorCell::CalculateDisplacement(const InteractionForce* force,
337336

338337
// Compute new oxygen or immunostimulatory factor concentration after
339338
// consumption/ secretion
340-
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
341339
real_t TumorCell::ConsumeSecreteSubstance(int substance_id,
342340
real_t old_concentration) {
343341
// constant1_oxygen_ = 0; // Debug
@@ -653,4 +651,4 @@ bool StateControlGrowProliferate::ShouldEnterNecrosis(real_t oxygen_level,
653651
return enter_necrosis; // Return whether the cell entered necrosis
654652
}
655653

656-
} // namespace bdm
654+
} // namespace bdm

0 commit comments

Comments
 (0)