mirror of https://github.com/aap/librw.git
fix 'warning: suggest parentheses around arithmetic in operand of ‘|’' in public headers
This commit is contained in:
parent
12269003da
commit
9ef08cbb19
|
@ -601,7 +601,7 @@ libraryIDPack(int version, int build)
|
||||||
{
|
{
|
||||||
if(version <= 0x31000)
|
if(version <= 0x31000)
|
||||||
return version>>8;
|
return version>>8;
|
||||||
return (version-0x30000 & 0x3FF00) << 14 | (version&0x3F) << 16 |
|
return ((version-0x30000) & 0x3FF00) << 14 | (version&0x3F) << 16 |
|
||||||
(build & 0xFFFF);
|
(build & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -609,7 +609,7 @@ inline int
|
||||||
libraryIDUnpackVersion(uint32 libid)
|
libraryIDUnpackVersion(uint32 libid)
|
||||||
{
|
{
|
||||||
if(libid & 0xFFFF0000)
|
if(libid & 0xFFFF0000)
|
||||||
return (libid>>14 & 0x3FF00) + 0x30000 |
|
return ((libid>>14 & 0x3FF00) + 0x30000) |
|
||||||
(libid>>16 & 0x3F);
|
(libid>>16 & 0x3F);
|
||||||
else
|
else
|
||||||
return libid<<8;
|
return libid<<8;
|
||||||
|
|
|
@ -258,11 +258,11 @@ struct Texture
|
||||||
static Texture *fromDict(LLLink *lnk){
|
static Texture *fromDict(LLLink *lnk){
|
||||||
return LLLinkGetData(lnk, Texture, inDict); }
|
return LLLinkGetData(lnk, Texture, inDict); }
|
||||||
FilterMode getFilter(void) { return (FilterMode)(filterAddressing & 0xFF); }
|
FilterMode getFilter(void) { return (FilterMode)(filterAddressing & 0xFF); }
|
||||||
void setFilter(FilterMode f) { filterAddressing = filterAddressing & ~0xFF | f; }
|
void setFilter(FilterMode f) { filterAddressing = (filterAddressing & ~0xFF) | f; }
|
||||||
Addressing getAddressU(void) { return (Addressing)((filterAddressing >> 8) & 0xF); }
|
Addressing getAddressU(void) { return (Addressing)((filterAddressing >> 8) & 0xF); }
|
||||||
Addressing getAddressV(void) { return (Addressing)((filterAddressing >> 12) & 0xF); }
|
Addressing getAddressV(void) { return (Addressing)((filterAddressing >> 12) & 0xF); }
|
||||||
void setAddressU(Addressing u) { filterAddressing = filterAddressing & ~0xF00 | u<<8; }
|
void setAddressU(Addressing u) { filterAddressing = (filterAddressing & ~0xF00) | u<<8; }
|
||||||
void setAddressV(Addressing v) { filterAddressing = filterAddressing & ~0xF000 | v<<12; }
|
void setAddressV(Addressing v) { filterAddressing = (filterAddressing & ~0xF000) | v<<12; }
|
||||||
static Texture *streamRead(Stream *stream);
|
static Texture *streamRead(Stream *stream);
|
||||||
bool streamWrite(Stream *stream);
|
bool streamWrite(Stream *stream);
|
||||||
uint32 streamGetSize(void);
|
uint32 streamGetSize(void);
|
||||||
|
|
Loading…
Reference in New Issue