[Scummvm-git-logs] scummvm master -> 7ac9c490519a601ba8cadb6d20902e0ca960e554
sluicebox
noreply at scummvm.org
Tue Apr 15 08:26:38 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8fdfa39723 GRAPHICS: Remove redundant palette size check. PVS-Studio V547
7ce6318cbc VIDEO: QTVR: Add missing else. PVS-Studio V646
7ac9c49051 GOT: Fix deallocations in Sound destructor
Commit: 8fdfa39723c94add5caf3a3b5fc6e9dacd5305cc
https://github.com/scummvm/scummvm/commit/8fdfa39723c94add5caf3a3b5fc6e9dacd5305cc
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-04-15T01:26:15-07:00
Commit Message:
GRAPHICS: Remove redundant palette size check. PVS-Studio V547
Changed paths:
graphics/palette.cpp
diff --git a/graphics/palette.cpp b/graphics/palette.cpp
index 651a539d95b..b21947253f1 100644
--- a/graphics/palette.cpp
+++ b/graphics/palette.cpp
@@ -91,12 +91,9 @@ void Palette::clear() {
void Palette::resize(uint newSize, bool preserve) {
if (newSize > _size) {
- byte *newData = nullptr;
- if (newSize > 0) {
- newData = new byte[newSize * 3]();
- if (_size > 0 && preserve)
- memcpy(newData, _data, _size * 3);
- }
+ byte *newData = new byte[newSize * 3]();
+ if (_size > 0 && preserve)
+ memcpy(newData, _data, _size * 3);
delete[] _data;
_data = newData;
Commit: 7ce6318cbced5e4c02a7b31784b2d172b7d205ee
https://github.com/scummvm/scummvm/commit/7ce6318cbced5e4c02a7b31784b2d172b7d205ee
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-04-15T01:26:15-07:00
Commit Message:
VIDEO: QTVR: Add missing else. PVS-Studio V646
Changed paths:
video/qtvr_decoder.cpp
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index e1872c3b6f6..c8db8746ea6 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -281,7 +281,7 @@ void QuickTimeDecoder::setTargetSize(uint16 w, uint16 h) {
_height = h;
setFOV(_fov);
- } if (_qtvrType == QTVRType::OBJECT) {
+ } else if (_qtvrType == QTVRType::OBJECT) {
if (_width != w)
_scaleFactorX *= Common::Rational(_width, w);
Commit: 7ac9c490519a601ba8cadb6d20902e0ca960e554
https://github.com/scummvm/scummvm/commit/7ac9c490519a601ba8cadb6d20902e0ca960e554
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-04-15T01:26:16-07:00
Commit Message:
GOT: Fix deallocations in Sound destructor
CID 1592974
Changed paths:
engines/got/sound.cpp
diff --git a/engines/got/sound.cpp b/engines/got/sound.cpp
index 8fdbe0ab918..8d5cd19db2e 100644
--- a/engines/got/sound.cpp
+++ b/engines/got/sound.cpp
@@ -44,26 +44,22 @@ Sound::Sound() {
Sound::~Sound() {
delete[] _soundData;
- for (int i = 0; i < 3; i++) {
- delete(_bossSounds[i]);
+ for (int i = 0; i < ARRAYSIZE(_bossSounds); i++) {
+ delete[] _bossSounds[i];
}
- musicStop();
+ if (_musicParser != nullptr) {
+ musicStop();
+ }
if (_musicDriver != nullptr) {
_musicDriver->setTimerCallback(nullptr, nullptr);
_musicDriver->close();
}
- if (_musicParser != nullptr) {
- delete _musicParser;
- }
- if (_musicDriver != nullptr) {
- delete _musicDriver;
- }
-
- if (_musicData != nullptr)
- delete[] _musicData;
+ delete _musicParser;
+ delete _musicDriver;
+ delete[] _musicData;
}
void Sound::load() {
More information about the Scummvm-git-logs
mailing list