diff options
author | D G Turner | 2018-10-07 07:31:23 +0100 |
---|---|---|
committer | D G Turner | 2018-10-07 07:31:23 +0100 |
commit | cc2260d80d65b6fb06d27a79c2f254e1d6a578ad (patch) | |
tree | fa4c30a164644230688a230689d0690dcff98b3d | |
parent | 5d40a61b6021126a30b6bca03d282544cdadcfce (diff) | |
download | scummvm-rg350-cc2260d80d65b6fb06d27a79c2f254e1d6a578ad.tar.gz scummvm-rg350-cc2260d80d65b6fb06d27a79c2f254e1d6a578ad.tar.bz2 scummvm-rg350-cc2260d80d65b6fb06d27a79c2f254e1d6a578ad.zip |
DEVTOOLS: Fix Compiler Warnings in create_cryo tool.
Have compared output dat files from the tool before and after this
change and they are identical.
-rw-r--r-- | devtools/create_cryo/create_cryo_dat.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/devtools/create_cryo/create_cryo_dat.cpp b/devtools/create_cryo/create_cryo_dat.cpp index 817eda3d20..b9b0b2852f 100644 --- a/devtools/create_cryo/create_cryo_dat.cpp +++ b/devtools/create_cryo/create_cryo_dat.cpp @@ -31,14 +31,14 @@ template <typename T> static void writeLE(FILE *f, T value) { - for (int i = 0; i < sizeof(value); i++, value >>= 8) { + for (unsigned int i = 0; i < sizeof(value); i++, value >>= 8) { unsigned char b = value & 0xFF; fwrite(&b, 1, 1, f); } } struct _icon_t : icon_t { - void write(FILE *f) { + void write(FILE *f) const { writeLE<int16>(f, sx); writeLE<int16>(f, sy); writeLE<int16>(f, ex); @@ -50,13 +50,13 @@ struct _icon_t : icon_t { }; static void emitIcons(FILE *f) { - _icon_t *icons = (_icon_t*)gameIcons; + const _icon_t *icons = (const _icon_t*)gameIcons; for (int i = 0; i < kNumIcons; i++) icons[i].write(f); } struct _room_t : room_t { - void write(FILE *f) { + void write(FILE *f) const { writeLE<byte>(f, ff_0); writeLE<byte>(f, exits[0]); writeLE<byte>(f, exits[1]); @@ -73,7 +73,7 @@ struct _room_t : room_t { }; static void emitRooms(FILE *f) { - _room_t *rooms = (_room_t*)gameRooms; + const _room_t *rooms = (const _room_t*)gameRooms; for (int i = 0; i < kNumRooms; i++) rooms[i].write(f); } |