From 574f2936d480fe787ae118fccde4be0025768c95 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Fri, 17 Jun 2016 10:08:45 +0200 Subject: [PATCH] - Fixed GCC/Clang compiler errors and warnings. --- src/g_doom/a_doomweaps.cpp | 2 +- src/p_pspr.cpp | 11 ++++++----- src/p_saveg.cpp | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 3842c7279..bf95b58be 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -668,7 +668,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray) // [XA] Set the originator of the rays to the projectile (self) if // the new flag is set, else set it to the player (self->target) - originator = (flags & BFGF_MISSILEORIGIN) ? self : self->target; + originator = (flags & BFGF_MISSILEORIGIN) ? self : (AActor *)(self->target); // offset angles from its attack angle for (i = 0; i < numrays; i++) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index d91b7ab00..3b57dd283 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -111,13 +111,14 @@ END_POINTERS //------------------------------------------------------------------------ DPSprite::DPSprite(player_t *owner, AActor *caller, int id) -: processPending(true), - firstTic(true), - x(.0), y(.0), +: x(.0), y(.0), oldx(.0), oldy(.0), - Flags(0), ID(id), + firstTic(true), + Flags(0), Caller(caller), - Owner(owner) + Owner(owner), + ID(id), + processPending(true) { DPSprite *prev = nullptr; DPSprite *next = Owner->psprites; diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 2b812bd96..a6c34857f 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -56,7 +56,7 @@ #include "p_acs.h" #include "p_terrain.h" -static void CopyPlayer (player_t *dst, player_t *src, const char *name); +void CopyPlayer (player_t *dst, player_t *src, const char *name); static void ReadOnePlayer (FArchive &arc, bool skipload); static void ReadMultiplePlayers (FArchive &arc, int numPlayers, int numPlayersNow, bool skipload); static void SpawnExtraPlayers (); @@ -255,7 +255,7 @@ static void ReadMultiplePlayers (FArchive &arc, int numPlayers, int numPlayersNo delete[] nametemp; } -static void CopyPlayer (player_t *dst, player_t *src, const char *name) +void CopyPlayer (player_t *dst, player_t *src, const char *name) { // The userinfo needs to be saved for real players, but it // needs to come from the save for bots.