- case DataBuffer.TYPE_INT: return new Integer(((int[]) r)[0]);
- case DataBuffer.TYPE_FLOAT: return new Float(((float[]) r)[0]);
- case DataBuffer.TYPE_DOUBLE: return new Double(((double[]) r)[0]);
+ case DataBuffer.TYPE_INT: {
+ int val = ((int[]) r)[0] - pipeDepthUnderGround;
+ return new Integer(val);
+ }
+ case DataBuffer.TYPE_FLOAT: {
+ float val = ((float[]) r)[0] - pipeDepthUnderGround;
+ return new Float(val);
+ }
+ case DataBuffer.TYPE_DOUBLE: {
+ double val = ((double[]) r)[0] - pipeDepthUnderGround;
+ return new Double(val);
+ }