diff options
author | rubidium <rubidium@openttd.org> | 2011-11-12 13:00:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-12 13:00:29 +0000 |
commit | 7fd1e1df81c3ed45e176f1bbf46d873b6cff316e (patch) | |
tree | 8f2ad83400a7897a066ff4f500bd0cdd150c1b93 /src/blitter | |
parent | d61b90ac6fb63ee42f47ca53cacd5aa7d7b30bae (diff) | |
download | openttd-7fd1e1df81c3ed45e176f1bbf46d873b6cff316e.tar.xz |
(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free
Diffstat (limited to 'src/blitter')
-rw-r--r-- | src/blitter/32bpp_optimized.cpp | 2 | ||||
-rw-r--r-- | src/blitter/factory.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/blitter/32bpp_optimized.cpp b/src/blitter/32bpp_optimized.cpp index acbf91b0f..8449fb154 100644 --- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -354,7 +354,7 @@ Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorPr lengths[z][1] = (byte *)dst_n_ln - (byte *)dst_n_orig[z]; free(src_orig->data); - free((void *)src_orig); + free(src_orig); } uint len = 0; // total length of data diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp index 956b39c9d..e480459cc 100644 --- a/src/blitter/factory.hpp +++ b/src/blitter/factory.hpp @@ -78,7 +78,7 @@ public: if (this->name == NULL) return; GetBlitters().erase(this->name); if (GetBlitters().empty()) delete &GetBlitters(); - free((void *)this->name); + free(this->name); } /** |