Fix some compilation warnings

This commit is contained in:
Tulio Leao 2019-10-16 08:42:31 -03:00
parent 19b7bed37e
commit 28812760e7
3 changed files with 6 additions and 8 deletions

View File

@ -442,7 +442,7 @@ static void window_scenarioselect_paint(rct_window* w, rct_drawpixelinfo* dpi)
: STR_WINDOW_COLOUR_2_STRINGID; : STR_WINDOW_COLOUR_2_STRINGID;
// Text for each tab // Text for each tab
for (int32_t i = 0; i < 8; i++) for (uint32_t i = 0; i < std::size(ScenarioOriginStringIds); i++)
{ {
rct_widget* widget = &window_scenarioselect_widgets[WIDX_TAB1 + i]; rct_widget* widget = &window_scenarioselect_widgets[WIDX_TAB1 + i];
if (widget->type == WWT_EMPTY) if (widget->type == WWT_EMPTY)

View File

@ -621,7 +621,7 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc)
// Get palette option, if present // Get palette option, if present
bool keep_palette = false; bool keep_palette = false;
json_t* palette = json_object_get(sprite_description, "palette"); json_t* palette = json_object_get(sprite_description, "palette");
if (palette && json_is_string(palette)) if (json_is_string(palette))
{ {
const char* option = json_string_value(palette); const char* option = json_string_value(palette);
if (strncmp(option, "keep", 4) == 0) if (strncmp(option, "keep", 4) == 0)

View File

@ -55,15 +55,13 @@ private:
int32_t _wallType{ -1 }; int32_t _wallType{ -1 };
CoordsXYZ _loc; CoordsXYZ _loc;
Direction _edge{ INVALID_DIRECTION }; Direction _edge{ INVALID_DIRECTION };
int32_t _primaryColour; int32_t _primaryColour{ 0 };
int32_t _secondaryColour; int32_t _secondaryColour{ 0 };
int32_t _tertiaryColour; int32_t _tertiaryColour{ 0 };
BannerIndex _bannerId{ BANNER_INDEX_NULL }; BannerIndex _bannerId{ BANNER_INDEX_NULL };
public: public:
WallPlaceAction() WallPlaceAction() = default;
{
}
WallPlaceAction( WallPlaceAction(
int32_t wallType, CoordsXYZ loc, uint8_t edge, int32_t primaryColour, int32_t secondaryColour, int32_t tertiaryColour) int32_t wallType, CoordsXYZ loc, uint8_t edge, int32_t primaryColour, int32_t secondaryColour, int32_t tertiaryColour)