mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-20 16:41:02 +00:00
- fixed a few warnings pointed out by GCC.
This commit is contained in:
parent
72d7a70732
commit
cffe67dcee
5 changed files with 19 additions and 9 deletions
|
@ -828,7 +828,7 @@ void MapLoader::FixHoles()
|
||||||
segloops.Reserve(1);
|
segloops.Reserve(1);
|
||||||
auto *segloop = &segloops.Last();
|
auto *segloop = &segloops.Last();
|
||||||
|
|
||||||
seg_t *startseg;
|
seg_t *startseg = nullptr;
|
||||||
seg_t *checkseg;
|
seg_t *checkseg;
|
||||||
while (bogussegs.Size() > 0)
|
while (bogussegs.Size() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,7 +166,7 @@ void MapLoader::SpawnLinePortal(line_t* line)
|
||||||
line->portalindex = Level->linePortals.Reserve(1);
|
line->portalindex = Level->linePortals.Reserve(1);
|
||||||
FLinePortal *port = &Level->linePortals.Last();
|
FLinePortal *port = &Level->linePortals.Last();
|
||||||
|
|
||||||
memset(port, 0, sizeof(FLinePortal));
|
port->Clear();
|
||||||
port->mOrigin = line;
|
port->mOrigin = line;
|
||||||
port->mDestination = &ln;
|
port->mDestination = &ln;
|
||||||
port->mType = PORTT_LINKED;
|
port->mType = PORTT_LINKED;
|
||||||
|
@ -177,7 +177,7 @@ void MapLoader::SpawnLinePortal(line_t* line)
|
||||||
ln.portalindex = Level->linePortals.Reserve(1);
|
ln.portalindex = Level->linePortals.Reserve(1);
|
||||||
port = &Level->linePortals.Last();
|
port = &Level->linePortals.Last();
|
||||||
|
|
||||||
memset(port, 0, sizeof(FLinePortal));
|
port->Clear();
|
||||||
port->mOrigin = &ln;
|
port->mOrigin = &ln;
|
||||||
port->mDestination = line;
|
port->mDestination = line;
|
||||||
port->mType = PORTT_LINKED;
|
port->mType = PORTT_LINKED;
|
||||||
|
|
|
@ -245,11 +245,11 @@ void FLevelLocals::ClearPortals()
|
||||||
PortalBlockmap.Clear();
|
PortalBlockmap.Clear();
|
||||||
|
|
||||||
// The first entry must always be the default skybox. This is what every sector gets by default.
|
// The first entry must always be the default skybox. This is what every sector gets by default.
|
||||||
memset(§orPortals[0], 0, sizeof(sectorPortals[0]));
|
sectorPortals[0].Clear();
|
||||||
sectorPortals[0].mType = PORTS_SKYVIEWPOINT;
|
sectorPortals[0].mType = PORTS_SKYVIEWPOINT;
|
||||||
sectorPortals[0].mFlags = PORTSF_SKYFLATONLY;
|
sectorPortals[0].mFlags = PORTSF_SKYFLATONLY;
|
||||||
// The second entry will be the default sky. This is for forcing a regular sky through the skybox picker
|
// The second entry will be the default sky. This is for forcing a regular sky through the skybox picker
|
||||||
memset(§orPortals[1], 0, sizeof(sectorPortals[0]));
|
sectorPortals[1].Clear();
|
||||||
sectorPortals[1].mType = PORTS_SKYVIEWPOINT;
|
sectorPortals[1].mType = PORTS_SKYVIEWPOINT;
|
||||||
sectorPortals[1].mFlags = PORTSF_SKYFLATONLY;
|
sectorPortals[1].mFlags = PORTSF_SKYFLATONLY;
|
||||||
|
|
||||||
|
|
|
@ -2510,8 +2510,8 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
double bestfrac = 1.1;
|
double bestfrac = 1.1;
|
||||||
spechit_t besthit;
|
spechit_t besthit{};
|
||||||
int besthitnum;
|
int besthitnum = -1;
|
||||||
// find the portal nearest to the crossing actor
|
// find the portal nearest to the crossing actor
|
||||||
for (unsigned i = 0; i < portalhit.Size();i++)
|
for (unsigned i = 0; i < portalhit.Size();i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -197,7 +197,12 @@ struct FLinePortal
|
||||||
|
|
||||||
FLinePortal()
|
FLinePortal()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof *this);
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clear()
|
||||||
|
{
|
||||||
|
memset((void*)this, 0, sizeof * this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -246,7 +251,12 @@ struct FSectorPortal
|
||||||
|
|
||||||
FSectorPortal()
|
FSectorPortal()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof * this);
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clear()
|
||||||
|
{
|
||||||
|
memset((void*)this, 0, sizeof * this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MergeAllowed() const
|
bool MergeAllowed() const
|
||||||
|
|
Loading…
Reference in a new issue