/[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 2548 by schoenebeck, Tue May 13 12:17:43 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        int iFinalBits = 0;
52        int zoneBits = nZones - 1;
53        for (; zoneBits > 1; iFinalBits += 2, zoneBits >>= 2);
54        iFinalBits += zoneBits;
55        return iFinalBits;
56    }
57    
58  #endif // GIGEDIT_GLOBAL_H  #endif // GIGEDIT_GLOBAL_H

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

  ViewVC Help
Powered by ViewVC