From 112640e6c087f77f61056012f164a3f020db4fd3 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 31 Oct 2020 12:18:13 +0200 Subject: [PATCH] - fixed compilation warnings reported by GCC and Clang src/common/menu/menudef.cpp:785:19: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] src/playsim/p_pspr.cpp:178:3: warning: field 'processPending' will be initialized after field 'HAlign' [-Wreorder] --- src/common/menu/menudef.cpp | 4 ++-- src/playsim/p_pspr.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/menu/menudef.cpp b/src/common/menu/menudef.cpp index 6408108589..da73517b0a 100644 --- a/src/common/menu/menudef.cpp +++ b/src/common/menu/menudef.cpp @@ -769,8 +769,8 @@ static int GetInsertIndex(FScanner& sc, DMenuDescriptor* desc) // Find an existing menu item to use as insertion point sc.MustGetString(); - auto n = desc->mItems.Size(); - for (unsigned int i = 0; i < n; i++) + int n = desc->mItems.Size(); + for (int i = 0; i < n; i++) { auto item = desc->mItems[i]; diff --git a/src/playsim/p_pspr.cpp b/src/playsim/p_pspr.cpp index 826ab8e102..91a07d8ece 100644 --- a/src/playsim/p_pspr.cpp +++ b/src/playsim/p_pspr.cpp @@ -163,8 +163,11 @@ DEFINE_FIELD_BIT(DPSprite, Flags, bInterpolate, PSPF_INTERPOLATE) //------------------------------------------------------------------------ DPSprite::DPSprite(player_t *owner, AActor *caller, int id) -: x(.0), y(.0), +: HAlign(0), + VAlign(0), + x(.0), y(.0), oldx(.0), oldy(.0), + InterpolateTic(false), firstTic(true), Tics(0), Translation(0), @@ -175,10 +178,7 @@ DPSprite::DPSprite(player_t *owner, AActor *caller, int id) Sprite(0), Frame(0), ID(id), - processPending(true), - HAlign(0), - VAlign(0), - InterpolateTic(false) + processPending(true) { rotation = 0.; scale = {1.0, 1.0};