diff options
author | Filippos Karapetis | 2009-02-17 13:51:52 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-02-17 13:51:52 +0000 |
commit | d39d83e525d4a62e5b73727c65c7864d0adf2865 (patch) | |
tree | 20f77c124ac2429d22ab9ed3b3005dad9b185ef0 /engines/sci/sfx | |
parent | b8d2c41cdd5b6a1af38aec3f0f0ccda4c2c304f0 (diff) | |
download | scummvm-rg350-d39d83e525d4a62e5b73727c65c7864d0adf2865.tar.gz scummvm-rg350-d39d83e525d4a62e5b73727c65c7864d0adf2865.tar.bz2 scummvm-rg350-d39d83e525d4a62e5b73727c65c7864d0adf2865.zip |
Replaced sci_free() with free() - it's OK to free a NULL pointer, so the checking that sci_free() performed is not necessary
svn-id: r38406
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/iterator.cpp | 12 | ||||
-rw-r--r-- | engines/sci/sfx/mixer/soft.cpp | 12 | ||||
-rw-r--r-- | engines/sci/sfx/pcm-iterator.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/amiga.cpp | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp index bcaf4759b8..f86bc7d44c 100644 --- a/engines/sci/sfx/iterator.cpp +++ b/engines/sci/sfx/iterator.cpp @@ -1000,7 +1000,7 @@ _sci1_get_pcm(sci1_song_iterator_t *self) { self->next_sample = self->next_sample->next; - sci_free(sample); + free(sample); return feed; } else @@ -1269,7 +1269,7 @@ _sci1_cleanup(sci1_song_iterator_t *it) { while (sample_seeker) { sci1_sample_t *old_sample = sample_seeker; sample_seeker = sample_seeker->next; - sci_free(old_sample); + free(old_sample); } _sci0_cleanup((sci0_song_iterator_t *)it); @@ -1383,7 +1383,7 @@ _ff_handle_message(fast_forward_song_iterator_t *self, case _SIMSG_PLASTICWRAP_ACK_MORPH: if (self->delta <= 0) { song_iterator_t *it = self->delegate; - sci_free(self); + free(self); return it; } break; @@ -1658,13 +1658,13 @@ _tee_handle_message(tee_song_iterator_t *self, song_iterator_message_t msg) { if (self->may_destroy) songit_free(self->children[TEE_LEFT].it); old_it = self->children[TEE_RIGHT].it; - sci_free(self); + free(self); return old_it; } else if (!(self->status & TEE_RIGHT_ACTIVE)) { if (self->may_destroy) songit_free(self->children[TEE_RIGHT].it); old_it = self->children[TEE_LEFT].it; - sci_free(self); + free(self); return old_it; } else { sciprintf("[tee-iterator] WARNING:" @@ -1949,7 +1949,7 @@ songit_free(song_iterator_t *it) { for (i = 0; i < it->death_listeners_nr; i++) it->death_listeners[i].notify(it->death_listeners[i].self, it); - sci_free(it); + free(it); } } diff --git a/engines/sci/sfx/mixer/soft.cpp b/engines/sci/sfx/mixer/soft.cpp index 20a4bdc7ad..c736aa3c00 100644 --- a/engines/sci/sfx/mixer/soft.cpp +++ b/engines/sci/sfx/mixer/soft.cpp @@ -216,7 +216,7 @@ _mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { feed->destroy(feed); if (fs->buf) - sci_free(fs->buf); + free(fs->buf); self->feeds_nr--; @@ -255,16 +255,16 @@ mix_exit(sfx_pcm_mixer_t *self) { _mix_unsubscribe(self, self->feeds[0].feed); if (P->outbuf) - sci_free(P->outbuf); + free(P->outbuf); if (P->writebuf) - sci_free(P->writebuf); + free(P->writebuf); if (P->compbuf_l) - sci_free(P->compbuf_l); + free(P->compbuf_l); if (P->compbuf_l) - sci_free(P->compbuf_r); + free(P->compbuf_r); - sci_free(P); + free(P); self->private_bits /* = P */ = NULL; RELEASE_LOCK(); diff --git a/engines/sci/sfx/pcm-iterator.cpp b/engines/sci/sfx/pcm-iterator.cpp index 43d262c85e..1043dfaf1e 100644 --- a/engines/sci/sfx/pcm-iterator.cpp +++ b/engines/sci/sfx/pcm-iterator.cpp @@ -109,6 +109,6 @@ pi_poll(sfx_pcm_feed_t *self, byte *dest, int size) { static void pi_destroy(sfx_pcm_feed_t *self) { sci_refcount_decref(D->base_data); - sci_free(D); - sci_free(self); + free(D); + free(self); } diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp index 8850b5a731..9a7fb8c996 100644 --- a/engines/sci/sfx/softseq/amiga.cpp +++ b/engines/sci/sfx/softseq/amiga.cpp @@ -528,8 +528,8 @@ ami_exit(sfx_softseq_t *self) { for (i = 0; i < bank.size; i++) { if (bank.instruments[i]) { - sci_free(bank.instruments[i]->samples); - sci_free(bank.instruments[i]); + free(bank.instruments[i]->samples); + free(bank.instruments[i]); } } } |