Fix narrowing issue reported by gcc-4.7
This commit is contained in:
parent
ee2d45164e
commit
d1de48e4a4
|
@ -16,11 +16,11 @@
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T bswap32(T x)
|
inline T bswap32(T x)
|
||||||
{
|
{
|
||||||
char v[4] = {
|
unsigned char v[4] = {
|
||||||
(x & 0xff000000) >> 24,
|
(unsigned char)((x & 0xff000000) >> 24),
|
||||||
(x & 0x00ff0000) >> 16,
|
(unsigned char)((x & 0x00ff0000) >> 16),
|
||||||
(x & 0x0000ff00) >> 8,
|
(unsigned char)((x & 0x0000ff00) >> 8),
|
||||||
(x & 0x000000ff) >> 0,
|
(unsigned char)((x & 0x000000ff) >> 0),
|
||||||
};
|
};
|
||||||
return *(T *)v;
|
return *(T *)v;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
short w, h, pixels[16][16];
|
unsigned short w, h, pixels[16][16];
|
||||||
} big_mouse = {
|
} big_mouse = {
|
||||||
16,16,
|
16,16,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user