[Scummvm-cvs-logs] scummvm master -> 8df46608ad3f56012163b2e4e19d748bb187466d
Strangerke
Strangerke at scummvm.org
Sun Feb 16 14:42:24 CET 2014
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:
8df46608ad QUEEN: Silent some CppCheck warnings by reducing some variable scopes
Commit: 8df46608ad3f56012163b2e4e19d748bb187466d
https://github.com/scummvm/scummvm/commit/8df46608ad3f56012163b2e4e19d748bb187466d
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-16T05:39:59-08:00
Commit Message:
QUEEN: Silent some CppCheck warnings by reducing some variable scopes
Changed paths:
engines/queen/cutaway.cpp
engines/queen/graphics.cpp
engines/queen/talk.cpp
diff --git a/engines/queen/cutaway.cpp b/engines/queen/cutaway.cpp
index 1e53c00..ade1220 100644
--- a/engines/queen/cutaway.cpp
+++ b/engines/queen/cutaway.cpp
@@ -552,7 +552,6 @@ void Cutaway::dumpCutawayAnim(CutawayAnim &anim) {
const byte *Cutaway::handleAnimation(const byte *ptr, CutawayObject &object) {
// lines 1517-1770 in cutaway.c
int frameCount = 0;
- int header = 0;
int i;
CutawayAnim objAnim[56];
@@ -560,7 +559,7 @@ const byte *Cutaway::handleAnimation(const byte *ptr, CutawayObject &object) {
// Read animation frames
for (;;) {
- header = (int16)READ_BE_INT16(ptr);
+ int header = (int16)READ_BE_INT16(ptr);
ptr += 2;
if (-2 == header)
diff --git a/engines/queen/graphics.cpp b/engines/queen/graphics.cpp
index 70f7d7c..d98ddd6 100644
--- a/engines/queen/graphics.cpp
+++ b/engines/queen/graphics.cpp
@@ -522,7 +522,7 @@ void Graphics::setBobText(const BobSlot *pbs, const char *text, int textX, int t
// Calc text position
- short x, y, width, height;
+ short x, y, width;
if (flags) {
if (flags == 2)
@@ -540,7 +540,7 @@ void Graphics::setBobText(const BobSlot *pbs, const char *text, int textX, int t
BobFrame *pbf = _vm->bankMan()->fetchFrame(pbs->frameNum);
width = (pbf->width * pbs->scale) / 100;
- height = (pbf->height * pbs->scale) / 100;
+ short height = (pbf->height * pbs->scale) / 100;
y = y - height - 16 - lineCount * 9;
}
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index 1531510..dd3ce00 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -1252,7 +1252,6 @@ int16 Talk::selectSentence() {
_vm->input()->clearKeyVerb();
if (sentenceCount > 0) {
- int zone = 0;
int oldZone = 0;
while (0 == selectedSentence) {
@@ -1263,7 +1262,7 @@ int16 Talk::selectSentence() {
_vm->update();
Common::Point mouse = _vm->input()->getMousePos();
- zone = _vm->grid()->findZoneForPos(GS_PANEL, mouse.x, mouse.y);
+ int zone = _vm->grid()->findZoneForPos(GS_PANEL, mouse.x, mouse.y);
int mouseButton = _vm->input()->mouseButton();
_vm->input()->clearMouseButton();
More information about the Scummvm-git-logs
mailing list