]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
correcting compilation warnings
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Sep 2011 16:19:56 +0000 (16:19 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 12 Sep 2011 16:19:56 +0000 (16:19 +0000)
HLT/BASE/AliHLTIndexGrid.h

index e19ff3024cc5cb85394efd41ca994f11cd972d93..a688a02b8240081ec046083205ac25b8d0199c90 100644 (file)
@@ -87,30 +87,30 @@ class AliHLTIndexGrid {
     return xindex*fDimY*fDimZ + yindex*fDimZ + zindex;
   }
   T GetLowerBoundX(int cell) const {
-    if (fDimX==0 || fDimY==0 ||fDimZ==0) return 0.;
+    if (fDimX==0 || fDimY==0 ||fDimZ==0) return (T)0;
     int index=cell/(fDimY*fDimZ);
     return index*fStepX;
   }
   T GetCenterX(int cell) const {
-    if (fDimX==0 || fDimY==0 ||fDimZ==0) return 0.;
+    if (fDimX==0 || fDimY==0 ||fDimZ==0) return (T)0;
     return GetLowerBoundX(cell)+fStepX/2;
   }
   T GetLowerBoundY(int cell) const {
-    if (fDimX==0 || fDimY==0 ||fDimZ==0) return 0.;
+    if (fDimX==0 || fDimY==0 ||fDimZ==0) return (T)0;
     int index=cell%(fDimY*fDimZ); index/=fDimZ;
     return index*fStepY;
   }
   T GetCenterY(int cell) const {
-    if (fDimX==0 || fDimY==0 ||fDimZ==0) return 0.;
+    if (fDimX==0 || fDimY==0 ||fDimZ==0) return (T)0;
     return GetLowerBoundY(cell)+fStepY/2;
   }
   T GetLowerBoundZ(int cell) const {
-    if (fDimX==0 || fDimY==0 ||fDimZ==0) return 0.;
+    if (fDimX==0 || fDimY==0 ||fDimZ==0) return (T)0;
     int index=cell%(fDimY*fDimZ); index%=fDimZ;
     return index*fStepZ;
   }
   T GetCenterZ(int cell) const {
-    if (fDimX==0 || fDimY==0 ||fDimZ==0) return 0.;
+    if (fDimX==0 || fDimY==0 ||fDimZ==0) return (T)0;
     return GetLowerBoundZ(cell)+fStepZ/2;
   }
   int GetCellIndex(T x, T y, T z) const {
@@ -247,8 +247,8 @@ class AliHLTIndexGrid {
     // get the range end position
     int endCell=cell+1;
     if (x<0) endCell=fCellDimension;
-    else if (y<0) endCell=GetCellIndex(x+fStepX, -1., -1.); // all entries for fixed x
-    else if (z<0) endCell=GetCellIndex(x, y+fStepY, -1.); // all entries for fixed x and y
+    else if (y<0) endCell=GetCellIndex(x+fStepX, (T)-1, (T)-1); // all entries for fixed x
+    else if (z<0) endCell=GetCellIndex(x, y+fStepY, (T)-1); // all entries for fixed x and y
     if (endCell<=cell) {
       // cell index returned is never outside the array
       // so this is a special case where we get to the bounds of the array