mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix compiler warnings (#3583)
Includes: * type casting * properly counting fields to initialise
This commit is contained in:
parent
a675192bdf
commit
87d05f8a89
|
@ -188,7 +188,7 @@ void utf8_remove_formatting(utf8* string) {
|
|||
utf8* writePtr = string;
|
||||
|
||||
while (true) {
|
||||
uint32 code = utf8_get_next(readPtr, &readPtr);
|
||||
uint32 code = utf8_get_next(readPtr, (const utf8**)&readPtr);
|
||||
|
||||
if (code == 0) {
|
||||
*writePtr = 0;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "peep.h"
|
||||
#include "staff.h"
|
||||
|
||||
extern uint8 *gPeepWarningThrottle = RCT2_ADDRESS(RCT2_ADDRESS_PEEP_WARNING_THROTTLE, uint8);
|
||||
uint8 *gPeepWarningThrottle = RCT2_ADDRESS(RCT2_ADDRESS_PEEP_WARNING_THROTTLE, uint8);
|
||||
|
||||
enum {
|
||||
PATH_SEARCH_DEAD_END,
|
||||
|
|
|
@ -50,7 +50,6 @@ public:
|
|||
S6Importer::S6Importer()
|
||||
{
|
||||
FixIssues = false;
|
||||
memset(&_s6, 0, sizeof(_s6));
|
||||
}
|
||||
|
||||
void S6Importer::LoadSavedGame(const utf8 * path)
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
void Import();
|
||||
|
||||
private:
|
||||
const utf8 * _s6Path;
|
||||
rct_s6_data _s6;
|
||||
uint8 _gameVersion;
|
||||
const utf8 * _s6Path = nullptr;
|
||||
rct_s6_data _s6 = { 0 };
|
||||
uint8 _gameVersion = 0;
|
||||
};
|
||||
|
|
|
@ -162,7 +162,7 @@ static void sub_88ABA4(uint8 direction, uint8 x_offset, uint8 y_offset, uint32 s
|
|||
RCT2_GLOBAL(0x0014281B8, uint32) = ride_type->vehicles[0].base_image_id;
|
||||
|
||||
if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) {
|
||||
if (ride->vehicles[0] != -1) {
|
||||
if (ride->vehicles[0] != (uint16)-1) {
|
||||
rct_sprite *sprite = &g_sprite_list[ride->vehicles[0]];
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE;
|
||||
RCT2_GLOBAL(0x9DE578, rct_sprite *) = sprite;
|
||||
|
|
|
@ -244,7 +244,7 @@ static void sub_66F6E3()
|
|||
gResearchedRideTypes[i] = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 128; i++) {
|
||||
for (int i = 0; i < countof(RideTypePossibleTrackConfigurations); i++) {
|
||||
gResearchedTrackTypesA[i] = (RideTypePossibleTrackConfigurations[i] ) & 0xFFFFFFFFULL;
|
||||
gResearchedTrackTypesB[i] = (RideTypePossibleTrackConfigurations[i] >> 32ULL) & 0xFFFFFFFFULL;
|
||||
}
|
||||
|
|
|
@ -1938,7 +1938,7 @@ static void window_editor_object_selection_manage_tracks()
|
|||
gResearchedRideTypes[i] = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 128; i++) {
|
||||
for (int i = 0; i < countof(RideTypePossibleTrackConfigurations); i++) {
|
||||
gResearchedTrackTypesA[i] = (RideTypePossibleTrackConfigurations[i] ) & 0xFFFFFFFFULL;
|
||||
gResearchedTrackTypesB[i] = (RideTypePossibleTrackConfigurations[i] >> 32ULL) & 0xFFFFFFFFULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue