@@ -92,67 +92,67 @@ class TopologyDictionary
9292 // / Returns the x position of the COG for the n_th element
9393 inline float getXCOG (int n) const
9494 {
95- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
95+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
9696 return mVectorOfIDs [n].mXCOG ;
9797 }
9898 // / Returns the error on the x position of the COG for the n_th element
9999 inline float getErrX (int n) const
100100 {
101- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
101+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
102102 return mVectorOfIDs [n].mErrX ;
103103 }
104104 // / Returns the z position of the COG for the n_th element
105105 inline float getZCOG (int n) const
106106 {
107- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
107+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
108108 return mVectorOfIDs [n].mZCOG ;
109109 }
110110 // / Returns the error on the z position of the COG for the n_th element
111111 inline float getErrZ (int n) const
112112 {
113- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
113+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
114114 return mVectorOfIDs [n].mErrZ ;
115115 }
116116 // / Returns the error^2 on the x position of the COG for the n_th element
117117 inline float getErr2X (int n) const
118118 {
119- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
119+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
120120 return mVectorOfIDs [n].mErr2X ;
121121 }
122122 // / Returns the error^2 on the z position of the COG for the n_th element
123123 inline float getErr2Z (int n) const
124124 {
125- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
125+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
126126 return mVectorOfIDs [n].mErr2Z ;
127127 }
128128 // / Returns the hash of the n_th element
129129 inline unsigned long getHash (int n) const
130130 {
131- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
131+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
132132 return mVectorOfIDs [n].mHash ;
133133 }
134134 // / Returns the number of fired pixels of the n_th element
135135 inline int getNpixels (int n) const
136136 {
137- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
137+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
138138 return mVectorOfIDs [n].mNpixels ;
139139 }
140140 // / Returns the frequency of the n_th element;
141141 inline double getFrequency (int n) const
142142 {
143- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
143+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
144144 return mVectorOfIDs [n].mFrequency ;
145145 }
146146 // / Returns true if the element corresponds to a group of rare topologies
147147 inline bool isGroup (int n) const
148148 {
149- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
149+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
150150 return mVectorOfIDs [n].mIsGroup ;
151151 }
152152 // / Returns the pattern of the topology
153153 inline const ClusterPattern& getPattern (int n) const
154154 {
155- assert (n >= 0 || n < (int )mVectorOfIDs .size ());
155+ assert (n >= 0 && n < (int )mVectorOfIDs .size ());
156156 return mVectorOfIDs [n].mPattern ;
157157 }
158158
0 commit comments