Skip to content

Commit 2e585fc

Browse files
committed
add workaround for gcc 4.2.1 (Apple)
1 parent 206b766 commit 2e585fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

range_coder.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ template <typename FreqType, unsigned _N, int _BASE> struct rc_decoder_search_tr
126126
};
127127

128128
template <typename FreqType, unsigned _N, int _BASE = 0> struct rc_decoder_search_t : public rc_decoder_search_traits_t<FreqType, _N, _BASE> {
129-
static uint get_index(const FreqType *freq, FreqType pos) {
130-
uint left = 0;
131-
uint right = _N;
129+
static rc_type_t::uint get_index(const FreqType *freq, FreqType pos) {
130+
rc_type_t::uint left = 0;
131+
rc_type_t::uint right = _N;
132132
while(left < right) {
133-
uint mid = (left+right)/2;
133+
rc_type_t::uint mid = (left+right)/2;
134134
if (freq[mid+1] <= pos) left = mid+1;
135135
else right = mid;
136136
}
@@ -141,7 +141,7 @@ template <typename FreqType, unsigned _N, int _BASE = 0> struct rc_decoder_searc
141141
#ifdef RANGE_CODER_USE_SSE
142142

143143
template<int _BASE> struct rc_decoder_search_t<short, 256, _BASE> : public rc_decoder_search_traits_t<short, 256, _BASE> {
144-
static uint get_index(const short *freq, short pos) {
144+
static rc_type_t::uint get_index(const short *freq, short pos) {
145145
__m128i v = _mm_set1_epi16(pos);
146146
unsigned i, mask = 0;
147147
for (i = 0; i < 256; i += 16) {

0 commit comments

Comments
 (0)