Mercurial > hg > svcore
diff data/model/DenseThreeDimensionalModel.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | f073d924a7c3 |
children | aa588c391d1a fa1bec83441e |
line wrap: on
line diff
--- a/data/model/DenseThreeDimensionalModel.h Tue Mar 03 09:33:59 2015 +0000 +++ b/data/model/DenseThreeDimensionalModel.h Tue Mar 03 15:18:24 2015 +0000 @@ -93,7 +93,7 @@ * value which does not vary from one column to the next. This is * only meaningful if hasBinValues() returns true. */ - virtual float getBinValue(int n) const { return n; } + virtual float getBinValue(int n) const { return float(n); } /** * Obtain the name of the unit of the values returned from @@ -171,11 +171,11 @@ return SortNumeric; } - virtual long getFrameForRow(int row) const { - return row * getResolution(); + virtual sv_frame_t getFrameForRow(int row) const { + return sv_frame_t(row) * getResolution(); } - virtual int getRowForFrame(long frame) const { - return frame / getResolution(); + virtual int getRowForFrame(sv_frame_t frame) const { + return int(frame / getResolution()); } protected: