Skip to content

Commit 8e73925

Browse files
committed
More methods which could be const made const
1 parent 463e36e commit 8e73925

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Common/Field/src/MagFieldFast.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ bool MagFieldFast::Field(const math_utils::Point3D<double> xyz, double bxyz[3])
238238
bool MagFieldFast::GetSegment(float x, float y, float z, int& zSeg, int& rSeg, int& quadrant) const
239239
{
240240
// get segment of point location
241-
const float zGridSpaceInv = 1.f / (kSolZMax * 2 / kNSolZRanges);
241+
const float zGridSpaceInv = 1.f / (kSolZMax * 2 / (float)kNSolZRanges);
242242
zSeg = -1;
243243
if (z < kSolZMax) {
244244
if (z > -kSolZMax) {

Utilities/DataCompression/test/DataGenerator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ class DataGenerator
154154
// pointer operator->() const {return &mValue;}
155155
// reference operator[](size_type n) const;
156156

157-
bool operator==(const self_type& other) { return mCount == other.mCount; }
158-
bool operator!=(const self_type& other) { return not(*this == other); }
157+
bool operator==(const self_type& other) const { return mCount == other.mCount; }
158+
bool operator!=(const self_type& other) const { return not(*this == other); }
159159

160160
private:
161161
const ContainerT& mParent;

0 commit comments

Comments
 (0)