SAGA2: Fix more warnings

This commit is contained in:
Eugene Sandulenko 2021-06-22 12:07:14 +02:00
parent ce490339db
commit 415277d19e
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
4 changed files with 7 additions and 6 deletions

View File

@ -632,7 +632,7 @@ bool HuntToKillAssignment::isValid(void) {
// If the target actor is already dead, then this is not a valid
// assignment
if (flags & specificActor) {
SpecificActorTarget *sat = (SpecificActorTarget *)getTarget();
const SpecificActorTarget *sat = (const SpecificActorTarget *)getTarget();
if (sat->getTargetActor()->isDead()) return false;
}
@ -657,7 +657,7 @@ bool HuntToKillAssignment::taskNeeded(void) {
// If we're hunting a specific actor, we only need a task if that
// actor is still alive.
if (flags & specificActor) {
SpecificActorTarget *sat = (SpecificActorTarget *)getTarget();
const SpecificActorTarget *sat = (const SpecificActorTarget *)getTarget();
return !sat->getTargetActor()->isDead();
}

View File

@ -163,7 +163,7 @@ singleBuffer::singleBuffer(size_t newSize, audioInterface *sd, int16 newID)
targetSated = false;
ailSampleHandle = AIL_allocate_sample_handle(sd->dig);
if (ailSampleHandle == NULL)
audioFatal("Unable to allocate audio handle");
error("Unable to allocate audio handle");
AIL_init_sample(ailSampleHandle);
AILLOCated = -1;
audioSet = 0;
@ -194,7 +194,7 @@ musicBuffer::musicBuffer(size_t newSize, audioInterface *sd, int16 newID)
targetSated = false;
ailSampleHandle = AIL_allocate_sequence_handle(sd->mid);
if (ailSampleHandle == NULL)
audioFatal("Unable to allocate music handle");
error("Unable to allocate music handle");
data[1] = NULL;
audioSet = 0;
}

View File

@ -155,7 +155,8 @@ public:
soundDecoder(const soundDecoder &src);
bool operator==(const soundDecoder &src2) const;
inline operator bool() const {
return (bool) readf != NULL;
warning("STUB: soundDecoder::bool()");
return true;
}
void setNext(soundDecoder *sd) {

View File

@ -282,7 +282,7 @@ public:
// volume and enabled calls
bool active(void);
bool activeDIG(void) {
return dig != NULL;
return true;
}
bool enabled(volumeTarget i);
void enable(volumeTarget i, bool onOff);