removed extra const on return type, added cast (#177)
All checks were successful
Build on RHEL9 / build (push) Successful in 2m31s
Build on RHEL8 / build (push) Successful in 2m34s

Fixed warnings on apple clang:

- removed extra const on return type
- added cast to suppress a float to double conversion warning
This commit is contained in:
Erik Fröjdh
2025-05-20 15:27:38 +02:00
committed by GitHub
parent 81588fba3b
commit a6eebbe9bd
3 changed files with 5 additions and 5 deletions

View File

@ -133,9 +133,9 @@ class ClusterVector<Cluster<T, ClusterSizeX, ClusterSizeY, CoordType>> {
*/
size_t capacity() const { return m_data.capacity(); }
const auto begin() const { return m_data.begin(); }
auto begin() const { return m_data.begin(); }
const auto end() const { return m_data.end(); }
auto end() const { return m_data.end(); }
/**
* @brief Return the size in bytes of a single cluster

View File

@ -51,7 +51,7 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) {
Photon photon;
photon.x = cluster.x;
photon.y = cluster.y;
photon.energy = eta.sum;
photon.energy = static_cast<decltype(photon.energy)>(eta.sum);
// auto ie = nearest_index(m_energy_bins, photon.energy)-1;
// auto ix = nearest_index(m_etabinsx, eta.x)-1;
@ -99,7 +99,7 @@ Interpolator::interpolate(const ClusterVector<ClusterType> &clusters) {
Photon photon;
photon.x = cluster.x;
photon.y = cluster.y;
photon.energy = eta.sum;
photon.energy = static_cast<decltype(photon.energy)>(eta.sum);
// Now do some actual interpolation.
// Find which energy bin the cluster is in