Skip to content

Commit dc1aa24

Browse files
committed
fix some cppcoreguidelines-prefer-member-initializer issues
1 parent 822a8a0 commit dc1aa24

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

multi_physics/QED/include/picsar_qed/physics/breit_wheeler/breit_wheeler_engine_tables.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ namespace picsar::multi_physics::phys::breit_wheeler
221221
m_table{containers::equispaced_1d_table<RealType, VectorType>{
222222
math::m_log(params.chi_phot_min),
223223
math::m_log(params.chi_phot_max),
224-
vals}}
225-
{
226-
m_init_flag = true;
227-
}
224+
vals}},
225+
m_init_flag{true}
226+
{}
228227

229228
/*
230229
* Generates the content of the lookup table (not usable on GPUs).
@@ -432,9 +431,9 @@ namespace picsar::multi_physics::phys::breit_wheeler
432431

433432
protected:
434433
dndt_lookup_table_params<RealType> m_params; /* Table parameters*/
435-
bool m_init_flag = false; /* Initialization flag*/
436434
containers::equispaced_1d_table<
437435
RealType, VectorType> m_table; /* Table data */
436+
bool m_init_flag = false; /* Initialization flag*/
438437

439438
private:
440439
/*

multi_physics/QED/include/picsar_qed/physics/quantum_sync/quantum_sync_engine_tables_detail.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,14 @@ namespace picsar::multi_physics::phys::quantum_sync::detail
396396
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
397397
ITailOptFunctor(const int zsize, const int zfirst,
398398
const RealType zmin, const RealType zmax, const RealType zswitch) :
399-
m_zsize{zsize}, m_zfirst{zfirst}, m_zmin{zmin}, m_zswitch{zswitch}
400-
{
401-
m_exp_zswitch = math::m_exp(zswitch);
402-
m_coeff_first = (zfirst - 1) / (zswitch - zmin);
403-
m_coeff_second = (zsize - zfirst) / (math::m_exp(zmax) - m_exp_zswitch);
404-
}
399+
m_zsize{zsize},
400+
m_zfirst{zfirst},
401+
m_zmin{zmin},
402+
m_zswitch{zswitch},
403+
m_exp_zswitch{math::m_exp(zswitch)},
404+
m_coeff_first{(zfirst - 1) / (zswitch - zmin)},
405+
m_coeff_second{(zsize - zfirst) / (math::m_exp(zmax) - m_exp_zswitch)}
406+
{}
405407

406408
/**
407409
* Operator()

0 commit comments

Comments
 (0)