comparison base/ZoomConstraint.h @ 928:6a94bb528e9d warnfix_no_size_t

Remove size_t's, fix compiler warnings
author Chris Cannam
date Tue, 17 Jun 2014 13:52:07 +0100
parents abaf3d7195ce
children 12f3b48668d4
comparison
equal deleted inserted replaced
917:49618f39ff09 928:6a94bb528e9d
46 * For example, if a block size of 1523 frames per pixel is 46 * For example, if a block size of 1523 frames per pixel is
47 * requested but the underlying model only supports value 47 * requested but the underlying model only supports value
48 * summaries at powers-of-two block sizes, return 1024 or 2048 48 * summaries at powers-of-two block sizes, return 1024 or 2048
49 * depending on the rounding direction supplied. 49 * depending on the rounding direction supplied.
50 */ 50 */
51 virtual size_t getNearestBlockSize(size_t requestedBlockSize, 51 virtual int getNearestBlockSize(int requestedBlockSize,
52 RoundingDirection = RoundNearest) 52 RoundingDirection = RoundNearest)
53 const 53 const
54 { 54 {
55 if (requestedBlockSize > getMaxZoomLevel()) return getMaxZoomLevel(); 55 if (requestedBlockSize > getMaxZoomLevel()) return getMaxZoomLevel();
56 else return requestedBlockSize; 56 else return requestedBlockSize;
57 } 57 }
58 58
59 /** 59 /**
60 * Return the maximum zoom level within range for this constraint. 60 * Return the maximum zoom level within range for this constraint.
61 */ 61 */
62 virtual size_t getMaxZoomLevel() const { return 262144; } 62 virtual int getMaxZoomLevel() const { return 262144; }
63 }; 63 };
64 64
65 #endif 65 #endif
66 66