[Scummvm-git-logs] scummvm master -> 8da9cca186c39f74cf73a47e5453612e652b4de8
ccawley2011
noreply at scummvm.org
Thu Feb 23 11:23:56 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8da9cca186 IMAGE: Add override keywords for all codecs
Commit: 8da9cca186c39f74cf73a47e5453612e652b4de8
https://github.com/scummvm/scummvm/commit/8da9cca186c39f74cf73a47e5453612e652b4de8
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2023-02-23T11:23:21Z
Commit Message:
IMAGE: Add override keywords for all codecs
Changed paths:
image/codecs/bmp_raw.h
image/codecs/cdtoons.h
image/codecs/cinepak.h
image/codecs/indeo/indeo.h
image/codecs/indeo3.h
image/codecs/indeo4.h
image/codecs/indeo5.h
image/codecs/jyv1.h
image/codecs/mjpeg.h
image/codecs/mpeg.h
image/codecs/msrle.h
image/codecs/msrle4.h
image/codecs/msvideo1.h
image/codecs/qtrle.h
image/codecs/rpza.h
image/codecs/smc.h
image/codecs/svq1.h
image/codecs/truemotion1.h
image/codecs/xan.h
image/jpeg.h
diff --git a/image/codecs/bmp_raw.h b/image/codecs/bmp_raw.h
index dcd2965a8e1..0790671a875 100644
--- a/image/codecs/bmp_raw.h
+++ b/image/codecs/bmp_raw.h
@@ -34,10 +34,10 @@ namespace Image {
class BitmapRawDecoder : public Codec {
public:
BitmapRawDecoder(int width, int height, int bitsPerPixel, bool ignoreAlpha, bool flip = false);
- ~BitmapRawDecoder();
+ ~BitmapRawDecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override;
private:
Graphics::Surface _surface;
diff --git a/image/codecs/cdtoons.h b/image/codecs/cdtoons.h
index 5e51cdfc868..4fbf699251e 100644
--- a/image/codecs/cdtoons.h
+++ b/image/codecs/cdtoons.h
@@ -45,13 +45,13 @@ struct CDToonsBlock {
class CDToonsDecoder : public Codec {
public:
CDToonsDecoder(uint16 width, uint16 height);
- ~CDToonsDecoder();
+ ~CDToonsDecoder() override;
- Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
- bool containsPalette() const { return true; }
- const byte *getPalette() { _dirtyPalette = false; return _palette; }
- bool hasDirtyPalette() const { return _dirtyPalette; }
+ Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return Graphics::PixelFormat::createFormatCLUT8(); }
+ bool containsPalette() const override { return true; }
+ const byte *getPalette() override { _dirtyPalette = false; return _palette; }
+ bool hasDirtyPalette() const override { return _dirtyPalette; }
private:
Graphics::Surface *_surface;
diff --git a/image/codecs/cinepak.h b/image/codecs/cinepak.h
index 01732587aa7..2c67b194c5f 100644
--- a/image/codecs/cinepak.h
+++ b/image/codecs/cinepak.h
@@ -70,16 +70,16 @@ struct CinepakFrame {
class CinepakDecoder : public Codec {
public:
CinepakDecoder(int bitsPerPixel = 24);
- ~CinepakDecoder();
+ ~CinepakDecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return _pixelFormat; }
- bool containsPalette() const { return _ditherPalette != 0; }
- const byte *getPalette() { _dirtyPalette = false; return _ditherPalette; }
- bool hasDirtyPalette() const { return _dirtyPalette; }
- bool canDither(DitherType type) const;
- void setDither(DitherType type, const byte *palette);
+ bool containsPalette() const override { return _ditherPalette != 0; }
+ const byte *getPalette() override { _dirtyPalette = false; return _ditherPalette; }
+ bool hasDirtyPalette() const override { return _dirtyPalette; }
+ bool canDither(DitherType type) const override;
+ void setDither(DitherType type, const byte *palette) override;
private:
CinepakFrame _curFrame;
diff --git a/image/codecs/indeo/indeo.h b/image/codecs/indeo/indeo.h
index 591a3eb24b0..639d7f19023 100644
--- a/image/codecs/indeo/indeo.h
+++ b/image/codecs/indeo/indeo.h
@@ -531,7 +531,7 @@ protected:
/**
* Returns the pixel format for the decoder's surface
*/
- virtual Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
+ Graphics::PixelFormat getPixelFormat() const override { return _pixelFormat; }
/**
* Decode the Indeo picture header.
@@ -581,7 +581,7 @@ protected:
int scaleMV(int mv, int mvScale);
public:
IndeoDecoderBase(uint16 width, uint16 height, uint bitsPerPixel);
- virtual ~IndeoDecoderBase();
+ ~IndeoDecoderBase() override;
};
} // End of namespace Indeo
diff --git a/image/codecs/indeo3.h b/image/codecs/indeo3.h
index 7924a9eab78..d27b007f715 100644
--- a/image/codecs/indeo3.h
+++ b/image/codecs/indeo3.h
@@ -46,10 +46,10 @@ namespace Image {
class Indeo3Decoder : public Codec {
public:
Indeo3Decoder(uint16 width, uint16 height, uint bitsPerPixel = 24);
- ~Indeo3Decoder();
+ ~Indeo3Decoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override;
static bool isIndeo3(Common::SeekableReadStream &stream);
diff --git a/image/codecs/indeo4.h b/image/codecs/indeo4.h
index fa9bacbf7f6..0cba883991c 100644
--- a/image/codecs/indeo4.h
+++ b/image/codecs/indeo4.h
@@ -52,9 +52,9 @@ class Indeo4Decoder : public IndeoDecoderBase {
};
public:
Indeo4Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16);
- virtual ~Indeo4Decoder() {}
+ ~Indeo4Decoder() override {}
- virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
static bool isIndeo4(Common::SeekableReadStream &stream);
protected:
@@ -62,14 +62,14 @@ protected:
* Decode the Indeo 4 picture header.
* @returns 0 = Ok, negative number = error
*/
- virtual int decodePictureHeader();
+ int decodePictureHeader() override;
/**
* Rearrange decoding and reference buffers.
*/
- virtual void switchBuffers();
+ void switchBuffers() override;
- virtual bool isNonNullFrame() const;
+ bool isNonNullFrame() const override;
/**
* Decode Indeo 4 band header.
@@ -77,7 +77,7 @@ protected:
* @param[in,out] band pointer to the band descriptor
* @returns result code: 0 = OK, negative number = error
*/
- virtual int decodeBandHeader(IVIBandDesc *band);
+ int decodeBandHeader(IVIBandDesc *band) override;
/**
* Decode information (block type, cbp, quant delta, motion vector)
@@ -87,7 +87,7 @@ protected:
* @param[in,out] tile pointer to the tile descriptor
* @returns result code: 0 = OK, negative number = error
*/
- virtual int decodeMbInfo(IVIBandDesc *band, IVITile *tile);
+ int decodeMbInfo(IVIBandDesc *band, IVITile *tile) override;
/**
* Decodes huffman + RLE-coded transparency data within Indeo4 frames
@@ -97,7 +97,7 @@ protected:
/**
* Decodes optional transparency data within Indeo4 frames
*/
- virtual int decodeTransparency();
+ int decodeTransparency() override;
private:
int scaleTileSize(int defSize, int sizeFactor);
diff --git a/image/codecs/indeo5.h b/image/codecs/indeo5.h
index ef531c17413..e1cc82ba764 100644
--- a/image/codecs/indeo5.h
+++ b/image/codecs/indeo5.h
@@ -52,9 +52,9 @@ class Indeo5Decoder : public IndeoDecoderBase {
};
public:
Indeo5Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16);
- virtual ~Indeo5Decoder() {}
+ ~Indeo5Decoder() override {}
- virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
static bool isIndeo5(Common::SeekableReadStream &stream);
protected:
@@ -62,14 +62,14 @@ protected:
* Decode the Indeo 5 picture header.
* @returns 0 = Ok, negative number = error
*/
- virtual int decodePictureHeader();
+ int decodePictureHeader() override;
/**
* Rearrange decoding and reference buffers.
*/
- virtual void switchBuffers();
+ void switchBuffers() override;
- virtual bool isNonNullFrame() const;
+ bool isNonNullFrame() const override;
/**
* Decode Indeo 4 band header.
@@ -77,7 +77,7 @@ protected:
* @param[in,out] band pointer to the band descriptor
* @return result code: 0 = OK, negative number = error
*/
- virtual int decodeBandHeader(IVIBandDesc *band);
+ int decodeBandHeader(IVIBandDesc *band) override;
/**
* Decode information (block type, cbp, quant delta, motion vector)
@@ -87,7 +87,7 @@ protected:
* @param[in,out] tile pointer to the tile descriptor
* @return result code: 0 = OK, negative number = error
*/
- virtual int decodeMbInfo(IVIBandDesc *band, IVITile *tile);
+ int decodeMbInfo(IVIBandDesc *band, IVITile *tile) override;
private:
/**
* Decode Indeo5 GOP (Group of pictures) header.
diff --git a/image/codecs/jyv1.h b/image/codecs/jyv1.h
index 22c9f693937..227b1205ff5 100644
--- a/image/codecs/jyv1.h
+++ b/image/codecs/jyv1.h
@@ -34,7 +34,7 @@ namespace Image {
class JYV1Decoder : public Codec {
public:
JYV1Decoder (int width, int height, uint32 streamTag);
- ~JYV1Decoder();
+ ~JYV1Decoder() override;
const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
Graphics::PixelFormat getPixelFormat() const override;
diff --git a/image/codecs/mjpeg.h b/image/codecs/mjpeg.h
index 49676b109db..c52b38144ec 100644
--- a/image/codecs/mjpeg.h
+++ b/image/codecs/mjpeg.h
@@ -43,10 +43,10 @@ namespace Image {
class MJPEGDecoder : public Codec {
public:
MJPEGDecoder();
- ~MJPEGDecoder();
+ ~MJPEGDecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return _pixelFormat; }
private:
Graphics::PixelFormat _pixelFormat;
diff --git a/image/codecs/mpeg.h b/image/codecs/mpeg.h
index 7fab3c1eaf4..eb7a64af597 100644
--- a/image/codecs/mpeg.h
+++ b/image/codecs/mpeg.h
@@ -48,11 +48,11 @@ namespace Image {
class MPEGDecoder : public Codec {
public:
MPEGDecoder();
- ~MPEGDecoder();
+ ~MPEGDecoder() override;
// Codec interface
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return _pixelFormat; }
// MPEGPSDecoder call
bool decodePacket(Common::SeekableReadStream &packet, uint32 &framePeriod, Graphics::Surface *dst = 0);
diff --git a/image/codecs/msrle.h b/image/codecs/msrle.h
index cea7cb2680c..3d694b693bf 100644
--- a/image/codecs/msrle.h
+++ b/image/codecs/msrle.h
@@ -34,10 +34,10 @@ namespace Image {
class MSRLEDecoder : public Codec {
public:
MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
- ~MSRLEDecoder();
+ ~MSRLEDecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
byte _bitsPerPixel;
diff --git a/image/codecs/msrle4.h b/image/codecs/msrle4.h
index 9aa12f77d05..88a6db6d830 100644
--- a/image/codecs/msrle4.h
+++ b/image/codecs/msrle4.h
@@ -34,10 +34,10 @@ namespace Image {
class MSRLE4Decoder : public Codec {
public:
MSRLE4Decoder(uint16 width, uint16 height, byte bitsPerPixel);
- ~MSRLE4Decoder();
+ ~MSRLE4Decoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
byte _bitsPerPixel;
diff --git a/image/codecs/msvideo1.h b/image/codecs/msvideo1.h
index e7d07f90c0a..c7d405e3ffa 100644
--- a/image/codecs/msvideo1.h
+++ b/image/codecs/msvideo1.h
@@ -34,10 +34,10 @@ namespace Image {
class MSVideo1Decoder : public Codec {
public:
MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);
- ~MSVideo1Decoder();
+ ~MSVideo1Decoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return _surface->format; }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return _surface->format; }
private:
byte _bitsPerPixel;
diff --git a/image/codecs/qtrle.h b/image/codecs/qtrle.h
index 66a8a3c666e..82aeaedaf15 100644
--- a/image/codecs/qtrle.h
+++ b/image/codecs/qtrle.h
@@ -35,16 +35,16 @@ namespace Image {
class QTRLEDecoder : public Codec {
public:
QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
- ~QTRLEDecoder();
+ ~QTRLEDecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override;
- bool containsPalette() const { return _ditherPalette != 0; }
- const byte *getPalette() { _dirtyPalette = false; return _ditherPalette; }
- bool hasDirtyPalette() const { return _dirtyPalette; }
- bool canDither(DitherType type) const;
- void setDither(DitherType type, const byte *palette);
+ bool containsPalette() const override { return _ditherPalette != 0; }
+ const byte *getPalette() override { _dirtyPalette = false; return _ditherPalette; }
+ bool hasDirtyPalette() const override { return _dirtyPalette; }
+ bool canDither(DitherType type) const override;
+ void setDither(DitherType type, const byte *palette) override;
private:
byte _bitsPerPixel;
diff --git a/image/codecs/rpza.h b/image/codecs/rpza.h
index 5e8a2254a5e..c7a0b292b11 100644
--- a/image/codecs/rpza.h
+++ b/image/codecs/rpza.h
@@ -35,16 +35,16 @@ namespace Image {
class RPZADecoder : public Codec {
public:
RPZADecoder(uint16 width, uint16 height);
- ~RPZADecoder();
+ ~RPZADecoder() override;
const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return _format; }
+ Graphics::PixelFormat getPixelFormat() const override { return _format; }
- bool containsPalette() const { return _ditherPalette != 0; }
- const byte *getPalette() { _dirtyPalette = false; return _ditherPalette; }
- bool hasDirtyPalette() const { return _dirtyPalette; }
- bool canDither(DitherType type) const;
- void setDither(DitherType type, const byte *palette);
+ bool containsPalette() const override { return _ditherPalette != 0; }
+ const byte *getPalette() override { _dirtyPalette = false; return _ditherPalette; }
+ bool hasDirtyPalette() const override { return _dirtyPalette; }
+ bool canDither(DitherType type) const override;
+ void setDither(DitherType type, const byte *palette) override;
private:
Graphics::PixelFormat _format;
diff --git a/image/codecs/smc.h b/image/codecs/smc.h
index 6359043b720..3ef4687b736 100644
--- a/image/codecs/smc.h
+++ b/image/codecs/smc.h
@@ -41,10 +41,10 @@ enum {
class SMCDecoder : public Codec {
public:
SMCDecoder(uint16 width, uint16 height);
- ~SMCDecoder();
+ ~SMCDecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return Graphics::PixelFormat::createFormatCLUT8(); }
private:
Graphics::Surface *_surface;
diff --git a/image/codecs/svq1.h b/image/codecs/svq1.h
index 1aec2906cff..e9c678f38ba 100644
--- a/image/codecs/svq1.h
+++ b/image/codecs/svq1.h
@@ -41,10 +41,10 @@ namespace Image {
class SVQ1Decoder : public Codec {
public:
SVQ1Decoder(uint16 width, uint16 height);
- ~SVQ1Decoder();
+ ~SVQ1Decoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const { return _surface->format; }
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override { return _surface->format; }
private:
Graphics::Surface *_surface;
diff --git a/image/codecs/truemotion1.h b/image/codecs/truemotion1.h
index fb51a888d3f..b3b1cadce1f 100644
--- a/image/codecs/truemotion1.h
+++ b/image/codecs/truemotion1.h
@@ -39,12 +39,12 @@ namespace Image {
class TrueMotion1Decoder : public Codec {
public:
TrueMotion1Decoder();
- ~TrueMotion1Decoder();
+ ~TrueMotion1Decoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
// Always return RGB565
- Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
+ Graphics::PixelFormat getPixelFormat() const override { return Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); }
private:
Graphics::Surface *_surface;
diff --git a/image/codecs/xan.h b/image/codecs/xan.h
index 058052698b1..6ea9dc965ec 100644
--- a/image/codecs/xan.h
+++ b/image/codecs/xan.h
@@ -43,7 +43,7 @@ namespace Image {
class XanDecoder : public Codec {
public:
XanDecoder (int width, int height, int bitsPerPixel);
- ~XanDecoder();
+ ~XanDecoder() override;
const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
Graphics::PixelFormat getPixelFormat() const override;
diff --git a/image/jpeg.h b/image/jpeg.h
index 3f2693b520e..6b84fd7fa92 100644
--- a/image/jpeg.h
+++ b/image/jpeg.h
@@ -51,13 +51,13 @@ public:
~JPEGDecoder();
// ImageDecoder API
- virtual void destroy();
- virtual bool loadStream(Common::SeekableReadStream &str);
- virtual const Graphics::Surface *getSurface() const;
+ void destroy() override;
+ bool loadStream(Common::SeekableReadStream &str) override;
+ const Graphics::Surface *getSurface() const override;
// Codec API
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
- Graphics::PixelFormat getPixelFormat() const;
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
+ Graphics::PixelFormat getPixelFormat() const override;
// Special API for JPEG
enum ColorSpace {
More information about the Scummvm-git-logs
mailing list