Parent Directory | Revision Log | Patch
revision 2474 by schoenebeck, Sun Sep 15 18:16:21 2013 UTC | revision 2604 by schoenebeck, Sat Jun 7 22:34:31 2014 UTC | |
---|---|---|
# | Line 46 template<class T> inline std::string ToS | Line 46 template<class T> inline std::string ToS |
46 | return ss.str(); | return ss.str(); |
47 | } | } |
48 | ||
49 | /// Find the number of bits required to hold the specified amount of zones. | |
50 | inline int zoneCountToBits(int nZones) { | |
51 | if (!nZones) return 0; | |
52 | int iFinalBits = 0; | |
53 | int zoneBits = nZones - 1; | |
54 | for (; zoneBits > 1; iFinalBits += 2, zoneBits >>= 2); | |
55 | iFinalBits += zoneBits; | |
56 | return iFinalBits; | |
57 | } | |
58 | ||
59 | #endif // GIGEDIT_GLOBAL_H | #endif // GIGEDIT_GLOBAL_H |
|
ViewVC Help | |
Powered by ViewVC |