/[svn]/gigedit/trunk/src/gigedit/global.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/global.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch 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

Legend:
Removed from v.2474  
changed lines
  Added in v.2604

  ViewVC Help
Powered by ViewVC