[Scummvm-git-logs] scummvm master -> 1491484f448c866831add4d52d6d48203af5a5b6

sev- sev at scummvm.org
Sat May 16 20:51:48 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
18779dd5c7 PETKA: Added override keywords
1491484f44 PETKA: Fix warnings


Commit: 18779dd5c7ff5435f8985b0f6f4be7c2ea409378
    https://github.com/scummvm/scummvm/commit/18779dd5c7ff5435f8985b0f6f4be7c2ea409378
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-16T22:48:56+02:00

Commit Message:
PETKA: Added override keywords

Changed paths:
    engines/petka/detection.cpp
    engines/petka/petka.h


diff --git a/engines/petka/detection.cpp b/engines/petka/detection.cpp
index d5e794d235..fc25b5dcaf 100644
--- a/engines/petka/detection.cpp
+++ b/engines/petka/detection.cpp
@@ -47,20 +47,20 @@ public:
 		return "petka";
 	}
 
-	virtual const char *getName() const {
+	virtual const char *getName() const override {
 		return "Red Comrades";
 	}
 
-	virtual const char *getOriginalCopyright() const {
+	virtual const char *getOriginalCopyright() const override {
 		return "Red Comrades (C) S.K.I.F";
 	}
 
-	virtual bool hasFeature(MetaEngineFeature f) const;
-	virtual int getMaximumSaveSlot() const { return 18; }
-	virtual SaveStateList listSaves(const char *target) const;
-	virtual void removeSaveState(const char *target, int slot) const;
-	virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
-	virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+	virtual bool hasFeature(MetaEngineFeature f) const override;
+	virtual int getMaximumSaveSlot() const override { return 18; }
+	virtual SaveStateList listSaves(const char *target) const override;
+	virtual void removeSaveState(const char *target, int slot) const override;
+	virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
 };
 
 bool PetkaMetaEngine::hasFeature(MetaEngineFeature f) const {
diff --git a/engines/petka/petka.h b/engines/petka/petka.h
index 252db5207e..c493ffe52c 100644
--- a/engines/petka/petka.h
+++ b/engines/petka/petka.h
@@ -74,7 +74,7 @@ public:
 	void loadPart(byte part);
 	byte getPart();
 
-	virtual Common::Error run();
+	virtual Common::Error run() override;
 
 	Common::SeekableReadStream *openFile(const Common::String &name, bool addCurrentPath);
 


Commit: 1491484f448c866831add4d52d6d48203af5a5b6
    https://github.com/scummvm/scummvm/commit/1491484f448c866831add4d52d6d48203af5a5b6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-16T22:51:35+02:00

Commit Message:
PETKA: Fix warnings

Changed paths:
    engines/petka/flc.cpp
    engines/petka/video.cpp


diff --git a/engines/petka/flc.cpp b/engines/petka/flc.cpp
index 9f8b65398c..d74f5209ab 100644
--- a/engines/petka/flc.cpp
+++ b/engines/petka/flc.cpp
@@ -69,12 +69,16 @@ const Common::Rect &FlicDecoder::getBounds() const {
 	const Track *track = getTrack(0);
 	if (track)
 		return ((const FlicVideoTrack *)track)->getBounds();
+
+	return *(new Common::Rect(0, 0));
 }
 
 const Common::Array<Common::Rect> &FlicDecoder::getMskRects() const {
 	const Track *track = getTrack(0);
 	if (track)
 		return ((const FlicVideoTrack *)track)->getMskRects();
+
+	return *(new Common::Array<Common::Rect>());
 }
 
 uint32 FlicDecoder::getTransColor(const Graphics::PixelFormat &fmt) const {
@@ -155,6 +159,8 @@ bool FlicDecoder::FlicVideoTrack::loadMsk(Common::SeekableReadStream &stream) {
 	_bounds = _bounds.findIntersectingRect(Common::Rect(0, 0, _bounds.right, 479));
 	_bounds.right++;
 	_bounds.bottom++;
+
+	return true;
 }
 
 const Common::Rect &FlicDecoder::FlicVideoTrack::getBounds() const {
diff --git a/engines/petka/video.cpp b/engines/petka/video.cpp
index 0980192135..fa1297b3de 100644
--- a/engines/petka/video.cpp
+++ b/engines/petka/video.cpp
@@ -79,7 +79,7 @@ void VideoSystem::update() {
 		g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, x, 0, width, _screen.h);
 		g_system->updateScreen();
 
-		uint32 time = g_system->getMillis();
+		time = g_system->getMillis();
 		if (time - _shakeTime > 30) {
 			_shift = !_shift;
 			_shakeTime = time;
@@ -124,4 +124,4 @@ void VideoSystem::updateTime() {
 	_time = g_system->getMillis();
 }
 
-}
\ No newline at end of file
+}




More information about the Scummvm-git-logs mailing list