Skip to content

Commit eada652

Browse files
committed
fix const correctness and bugprone-exception-escape issues
1 parent c0ea38c commit eada652

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace picsar::multi_physics::phys::quantum_sync
6767
* @return the integral of kv(5/3, x) from y to infinity
6868
*/
6969
template<typename RealType>
70-
inline RealType inner_integral(const RealType y)
70+
RealType inner_integral(const RealType y)
7171
{
7272
using namespace math;
7373
return quad_a_inf<RealType>(
@@ -105,7 +105,7 @@ namespace picsar::multi_physics::phys::quantum_sync
105105
* @return the value of the integrand of the G function
106106
*/
107107
template<typename RealType>
108-
inline RealType compute_G_integrand(
108+
RealType compute_G_integrand(
109109
const RealType chi_part, const RealType csi) noexcept
110110
{
111111
using namespace math;
@@ -142,7 +142,7 @@ namespace picsar::multi_physics::phys::quantum_sync
142142
* @return the value of the G function
143143
*/
144144
template<typename RealType>
145-
inline RealType compute_G_function(const RealType chi_part)
145+
RealType compute_G_function(const RealType chi_part)
146146
{
147147
using namespace math;
148148
return quad_a_b_s<RealType>(
@@ -166,7 +166,7 @@ namespace picsar::multi_physics::phys::quantum_sync
166166
* @return the value of the numerator of the cumulative probability distribution
167167
*/
168168
template<typename RealType>
169-
inline RealType compute_cumulative_prob_numerator_a_b(
169+
RealType compute_cumulative_prob_numerator_a_b(
170170
const RealType chi_particle,
171171
RealType chi_photon_start,
172172
RealType chi_photon_end)
@@ -215,7 +215,7 @@ namespace picsar::multi_physics::phys::quantum_sync
215215
* @return the value of the numerator of the cumulative probability distribution
216216
*/
217217
template<typename RealType>
218-
inline RealType compute_cumulative_prob_numerator(
218+
RealType compute_cumulative_prob_numerator(
219219
const RealType chi_particle, RealType chi_photon)
220220
{
221221
using namespace math;
@@ -236,7 +236,7 @@ namespace picsar::multi_physics::phys::quantum_sync
236236
* @return the cumulative probability distribution calculated for all the chi parameters
237237
*/
238238
template<typename RealType, typename VectorType>
239-
inline VectorType compute_cumulative_prob(
239+
VectorType compute_cumulative_prob(
240240
const RealType chi_particle, const VectorType& chi_photons)
241241
{
242242
const auto den = compute_G_function(chi_particle);
@@ -271,7 +271,7 @@ namespace picsar::multi_physics::phys::quantum_sync
271271
* @return the cumulative probability distribution calculated for all the chi parameters
272272
*/
273273
template<typename RealType, typename VectorType>
274-
inline VectorType compute_cumulative_prob_opt(
274+
VectorType compute_cumulative_prob_opt(
275275
const RealType chi_particle, const VectorType& chi_photons)
276276
{
277277
if(!std::is_sorted(chi_photons.begin(), chi_photons.end())){

multi_physics/QED/kokkos_example/kokkos_example_quantum_synchrotron.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ auto generate_dndt_table(const Real chi_min, const Real chi_max, const int chi_s
3737
<< ", " << chi_size <<"]...\n";
3838
std::cout.flush();
3939

40-
pxr_qs::dndt_lookup_table_params<Real> qs_params{chi_min, chi_max, chi_size};
40+
const auto qs_params =
41+
pxr_qs::dndt_lookup_table_params<Real>{chi_min, chi_max, chi_size};
4142

4243
auto table = pxr_qs::dndt_lookup_table<
4344
Real, Vector>{qs_params};

0 commit comments

Comments
 (0)