From 6d28f4d48f5cb3462765c7a1d582cea49352be1f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 23 Sep 2012 19:52:08 +0300 Subject: Add missing final keywords to classes. --- src/resources/action.h | 2 +- src/resources/ambientlayer.h | 2 +- src/resources/animation.h | 4 ++-- src/resources/beinginfo.h | 4 ++-- src/resources/colordb.h | 2 +- src/resources/dye.h | 5 ++--- src/resources/emotedb.h | 4 ++-- src/resources/fboinfo.h | 2 +- src/resources/imagewriter.h | 2 +- src/resources/iteminfo.h | 2 +- src/resources/mapreader.h | 2 +- src/resources/music.h | 2 +- src/resources/openglimagehelper.h | 2 +- src/resources/resourcemanager.h | 2 +- src/resources/sdlimagehelper.h | 2 +- src/resources/soundeffect.h | 2 +- src/resources/specialdb.h | 2 +- src/resources/spritedef.h | 6 +++--- src/resources/subimage.h | 2 +- src/resources/wallpaper.h | 2 +- 20 files changed, 26 insertions(+), 27 deletions(-) (limited to 'src/resources') diff --git a/src/resources/action.h b/src/resources/action.h index 7b6494c99..0ad4ceaa1 100644 --- a/src/resources/action.h +++ b/src/resources/action.h @@ -31,7 +31,7 @@ class Animation; /** * An action consists of several animations, one for each direction. */ -class Action +class Action final { public: Action(); diff --git a/src/resources/ambientlayer.h b/src/resources/ambientlayer.h index e0593ce4f..a4890b24e 100644 --- a/src/resources/ambientlayer.h +++ b/src/resources/ambientlayer.h @@ -25,7 +25,7 @@ class Graphics; class Image; -class AmbientLayer +class AmbientLayer final { public: /** diff --git a/src/resources/animation.h b/src/resources/animation.h index ab2d83c4c..ad4b1b187 100644 --- a/src/resources/animation.h +++ b/src/resources/animation.h @@ -31,7 +31,7 @@ class Image; /** * A single frame in an animation, with a delay and an offset. */ -struct Frame +struct Frame final { enum FrameType { @@ -54,7 +54,7 @@ struct Frame * An animation consists of several frames, each with their own delay and * offset. */ -class Animation +class Animation final { friend class AnimatedSprite; friend class ParticleEmitter; diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index 0d3973a5c..ccd9ccf21 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -28,7 +28,7 @@ #include #include -struct Attack +struct Attack final { std::string action; std::string particleEffect; @@ -66,7 +66,7 @@ typedef std::map SoundEvents; * @see MonsterDB * @see NPCDB */ -class BeingInfo +class BeingInfo final { public: static BeingInfo *unknown; diff --git a/src/resources/colordb.h b/src/resources/colordb.h index 4be6503fb..1aa955d68 100644 --- a/src/resources/colordb.h +++ b/src/resources/colordb.h @@ -30,7 +30,7 @@ */ namespace ColorDB { - class ItemColor + class ItemColor final { public: ItemColor(): diff --git a/src/resources/dye.h b/src/resources/dye.h index cd5e58093..c519d6aec 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -35,10 +35,9 @@ const int aPaleteIndex = 8; /** * Class for performing a linear interpolation between colors. */ -class DyePalette +class DyePalette final { public: - /** * Creates a palette based on the given string. * The string is either a file name or a sequence of hexadecimal RGB @@ -89,7 +88,7 @@ class DyePalette /** * Class for dispatching pixel-recoloring amongst several palettes. */ -class Dye +class Dye final { public: diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h index 50742d7b5..1c210263a 100644 --- a/src/resources/emotedb.h +++ b/src/resources/emotedb.h @@ -29,13 +29,13 @@ class AnimatedSprite; -struct EmoteSprite +struct EmoteSprite final { const AnimatedSprite *sprite; std::string name; }; -struct EmoteInfo +struct EmoteInfo final { std::list sprites; StringVect particles; diff --git a/src/resources/fboinfo.h b/src/resources/fboinfo.h index 9dd754c19..54415e697 100644 --- a/src/resources/fboinfo.h +++ b/src/resources/fboinfo.h @@ -31,7 +31,7 @@ #include #include -struct FBOInfo +struct FBOInfo final { FBOInfo() : fboId(0), textureId(0), rboId(0) diff --git a/src/resources/imagewriter.h b/src/resources/imagewriter.h index 20705d26f..a95a53900 100644 --- a/src/resources/imagewriter.h +++ b/src/resources/imagewriter.h @@ -24,7 +24,7 @@ struct SDL_Surface; -class ImageWriter +class ImageWriter final { public: static bool writePNG(SDL_Surface *const surface, diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 9a81d65e9..644b80154 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -97,7 +97,7 @@ typedef SpriteToItemMap::const_iterator SpriteToItemMapCIter; * Defines a class for storing item infos. This includes information used when * the item is equipped. */ -class ItemInfo +class ItemInfo final { public: /** diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h index 186d643fc..172b8c1c5 100644 --- a/src/resources/mapreader.h +++ b/src/resources/mapreader.h @@ -34,7 +34,7 @@ class Tileset; /** * Reader for XML map files (*.tmx) */ -class MapReader +class MapReader final { public: /** diff --git a/src/resources/music.h b/src/resources/music.h index 0afbb428b..7e75ceaeb 100644 --- a/src/resources/music.h +++ b/src/resources/music.h @@ -30,7 +30,7 @@ /** * Defines a class for loading and storing music. */ -class Music : public Resource +class Music final : public Resource { public: /** diff --git a/src/resources/openglimagehelper.h b/src/resources/openglimagehelper.h index 36d51c29b..c93216e12 100644 --- a/src/resources/openglimagehelper.h +++ b/src/resources/openglimagehelper.h @@ -48,7 +48,7 @@ class Image; /** * Defines a class for loading and storing images. */ -class OpenGLImageHelper : public ImageHelper +class OpenGLImageHelper final : public ImageHelper { friend class CompoundSprite; friend class Graphics; diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index dee7f5459..7d6d38416 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -49,7 +49,7 @@ typedef DelayedAnim::iterator DelayedAnimIter; /** * A class for loading and managing resources. */ -class ResourceManager +class ResourceManager final { friend class Resource; diff --git a/src/resources/sdlimagehelper.h b/src/resources/sdlimagehelper.h index 183627435..2742755c2 100644 --- a/src/resources/sdlimagehelper.h +++ b/src/resources/sdlimagehelper.h @@ -35,7 +35,7 @@ class Image; /** * Defines a class for loading and storing images. */ -class SDLImageHelper : public ImageHelper +class SDLImageHelper final : public ImageHelper { friend class Image; diff --git a/src/resources/soundeffect.h b/src/resources/soundeffect.h index 7d23dcca0..203e3a8f8 100644 --- a/src/resources/soundeffect.h +++ b/src/resources/soundeffect.h @@ -30,7 +30,7 @@ /** * Defines a class for loading and storing sound effects. */ -class SoundEffect : public Resource +class SoundEffect final : public Resource { public: /** diff --git a/src/resources/specialdb.h b/src/resources/specialdb.h index 146d9d00f..1fa11df9e 100644 --- a/src/resources/specialdb.h +++ b/src/resources/specialdb.h @@ -25,7 +25,7 @@ #include #include -struct SpecialInfo +struct SpecialInfo final { enum TargetMode { diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h index 74960f64e..bc4f13a13 100644 --- a/src/resources/spritedef.h +++ b/src/resources/spritedef.h @@ -36,7 +36,7 @@ class Action; class Animation; class ImageSet; -struct SpriteReference +struct SpriteReference final { static SpriteReference *Empty; @@ -53,7 +53,7 @@ struct SpriteReference int variant; }; -struct SpriteDisplay +struct SpriteDisplay final { std::string image; std::string floor; @@ -107,7 +107,7 @@ enum SpriteDirection /** * Defines a class to load an animation. */ -class SpriteDef : public Resource +class SpriteDef final : public Resource { public: /** diff --git a/src/resources/subimage.h b/src/resources/subimage.h index 4b5478b71..719b9f4c1 100644 --- a/src/resources/subimage.h +++ b/src/resources/subimage.h @@ -45,7 +45,7 @@ /** * A clipped version of a larger image. */ -class SubImage : public Image +class SubImage final : public Image { public: /** diff --git a/src/resources/wallpaper.h b/src/resources/wallpaper.h index 517ace011..37168e093 100644 --- a/src/resources/wallpaper.h +++ b/src/resources/wallpaper.h @@ -28,7 +28,7 @@ /** * Handles organizing and choosing of wallpapers. */ -class Wallpaper +class Wallpaper final { public: /** -- cgit v1.2.3-60-g2f50