Changeset 3528


Ignore:
Timestamp:
Oct 21, 2013, 11:23:48 AM (5 years ago)
Author:
cameron
Message:

Fix parenthesization

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/util/bytelex.h

    r2172 r3528  
    274274template<CodeUnit_Base C>
    275275inline bool at_DOCTYPE_start(unsigned char x8data[]) {
    276         return s8int64(x8data) == c8int64<C, '<', '!','D', 'O', 'C', 'T', 'Y', 'P'>::value & AtChar<C,'E'>(&x8data[8]);
     276        return (s8int64(x8data) == c8int64<C, '<', '!','D', 'O', 'C', 'T', 'Y', 'P'>::value) & AtChar<C,'E'>(&x8data[8]);
    277277}
    278278
     
    364364template<CodeUnit_Base C>
    365365inline bool at_REQUIRED(unsigned char x8data[]) {
    366         return s8int64(x8data) == c8int64<C, '#', 'R', 'E', 'Q', 'U', 'I', 'R', 'E'>::value
     366        return (s8int64(x8data) == c8int64<C, '#', 'R', 'E', 'Q', 'U', 'I', 'R', 'E'>::value)
    367367          & AtChar<C,'D'>(&x8data[8]);
    368368}
  • trunk/lib/hash.hpp

    r2719 r3528  
    2828
    2929static int32_t bytes2bits(int32_t bytes) { return bytes * 8; }
    30 static int32_t bits2bytes(int32_t bits) /*{ return (bits + 8) / (8); } */ { return ((bits & (8-1) != 0) ? (bits + 8) / (8) : (bits/8)); }
     30static int32_t bits2bytes(int32_t bits) /*{ return (bits + 8) / (8); } */ { return (((bits & (8-1)) != 0) ? (bits + 8) / (8) : (bits/8)); }
    3131static IDISA_ALWAYS_INLINE uint64_t gen_mask(const uint32_t mask_bits);
    3232
Note: See TracChangeset for help on using the changeset viewer.