Make constexpr BEInt<Type, 2>::operator Type() C++11-compatible

Multiple return values not permitted until C++14
pull/2874/head
Behdad Esfahbod 4 years ago
parent c2fc2aa44c
commit e208f80449
  1. 3
      src/hb-algs.hh

@ -113,9 +113,10 @@ struct BEInt<Type, 2>
#else /* __BYTE_ORDER == __BIG_ENDIAN */ #else /* __BYTE_ORDER == __BIG_ENDIAN */
return ((packed_uint16_t *) this)->v; return ((packed_uint16_t *) this)->v;
#endif #endif
#endif #else
return (v[0] << 8) return (v[0] << 8)
+ (v[1] ); + (v[1] );
#endif
} }
private: uint8_t v[2]; private: uint8_t v[2];
}; };

Loading…
Cancel
Save