(svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls

This commit is contained in:
smatz
2011-12-18 17:17:18 +00:00
parent 88f1acd26b
commit 33d283fdb1
12 changed files with 19 additions and 12 deletions

View File

@@ -15,7 +15,7 @@
#include "32bpp_optimized.hpp"
/** The optimised 32 bpp blitter with palette animation. */
class Blitter_32bppAnim : public Blitter_32bppOptimized {
class Blitter_32bppAnim FINAL : public Blitter_32bppOptimized {
private:
uint8 *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation
int anim_buf_width; ///< The width of the animation buffer.

View File

@@ -16,7 +16,7 @@
#include "factory.hpp"
/** 8bpp blitter optimised for speed. */
class Blitter_8bppOptimized : public Blitter_8bppBase {
class Blitter_8bppOptimized FINAL : public Blitter_8bppBase {
public:
/** Data stored about a (single) sprite. */
struct SpriteData {

View File

@@ -16,7 +16,7 @@
#include "factory.hpp"
/** Most trivial 8bpp blitter. */
class Blitter_8bppSimple : public Blitter_8bppBase {
class Blitter_8bppSimple FINAL : public Blitter_8bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);