[Scummvm-git-logs] scummvm master -> cc2260d80d65b6fb06d27a79c2f254e1d6a578ad
digitall
dgturner at iee.org
Sun Oct 7 08:22:55 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
cc2260d80d DEVTOOLS: Fix Compiler Warnings in create_cryo tool.
Commit: cc2260d80d65b6fb06d27a79c2f254e1d6a578ad
https://github.com/scummvm/scummvm/commit/cc2260d80d65b6fb06d27a79c2f254e1d6a578ad
Author: D G Turner (digitall at scummvm.org)
Date: 2018-10-07T07:31:23+01:00
Commit Message:
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.
Changed paths:
devtools/create_cryo/create_cryo_dat.cpp
diff --git a/devtools/create_cryo/create_cryo_dat.cpp b/devtools/create_cryo/create_cryo_dat.cpp
index 817eda3..b9b0b28 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);
}
More information about the Scummvm-git-logs
mailing list