comparison 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
comparison
equal deleted inserted replaced
1037:bf0e5944289b 1038:cc27f35aa75c
91 /** 91 /**
92 * Return the value of bin n, if any. This is a "vertical scale" 92 * Return the value of bin n, if any. This is a "vertical scale"
93 * value which does not vary from one column to the next. This is 93 * value which does not vary from one column to the next. This is
94 * only meaningful if hasBinValues() returns true. 94 * only meaningful if hasBinValues() returns true.
95 */ 95 */
96 virtual float getBinValue(int n) const { return n; } 96 virtual float getBinValue(int n) const { return float(n); }
97 97
98 /** 98 /**
99 * Obtain the name of the unit of the values returned from 99 * Obtain the name of the unit of the values returned from
100 * getBinValue(), if any. 100 * getBinValue(), if any.
101 */ 101 */
169 } 169 }
170 virtual SortType getSortType(int) const { 170 virtual SortType getSortType(int) const {
171 return SortNumeric; 171 return SortNumeric;
172 } 172 }
173 173
174 virtual long getFrameForRow(int row) const { 174 virtual sv_frame_t getFrameForRow(int row) const {
175 return row * getResolution(); 175 return sv_frame_t(row) * getResolution();
176 } 176 }
177 virtual int getRowForFrame(long frame) const { 177 virtual int getRowForFrame(sv_frame_t frame) const {
178 return frame / getResolution(); 178 return int(frame / getResolution());
179 } 179 }
180 180
181 protected: 181 protected:
182 DenseThreeDimensionalModel() { } 182 DenseThreeDimensionalModel() { }
183 }; 183 };