[Scummvm-cvs-logs] scummvm master -> 074c11f7e1423ba6541fe86e8302b7ae52a369f8
Strangerke
Strangerke at scummvm.org
Sat Feb 8 19:06:31 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:
074c11f7e1 TSAGE: Silent some CppCheck warnings
Commit: 074c11f7e1423ba6541fe86e8302b7ae52a369f8
https://github.com/scummvm/scummvm/commit/074c11f7e1423ba6541fe86e8302b7ae52a369f8
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-08T10:05:01-08:00
Commit Message:
TSAGE: Silent some CppCheck warnings
Changed paths:
engines/tsage/core.cpp
engines/tsage/graphics.cpp
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 16fe450..ba14830 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1593,12 +1593,12 @@ bool SceneItem::startAction(CursorType action, Event &event) {
}
void SceneItem::doAction(int action) {
- const char *msg = NULL;
-
if (g_vm->getGameID() == GType_Ringworld2) {
Event dummyEvent;
((Ringworld2::SceneExt *)GLOBALS._sceneManager._scene)->display((CursorType)action, dummyEvent);
} else {
+ const char *msg = NULL;
+
switch ((int)action) {
case CURSOR_LOOK:
msg = LOOK_SCENE_HOTSPOT;
@@ -2909,7 +2909,6 @@ void BackgroundSceneObject::copySceneToBackground() {
void SceneObjectList::draw() {
Common::Array<SceneObject *> objList;
int paneNum = 0;
- int xAmount = 0, yAmount = 0;
if (_objList.size() == 0) {
// Alternate draw mode
@@ -2936,6 +2935,7 @@ void SceneObjectList::draw() {
g_globals->_scrollFollower->_position.x - g_globals->_sceneManager._scene->_sceneBounds.left,
g_globals->_scrollFollower->_position.y - g_globals->_sceneManager._scene->_sceneBounds.top);
int loadCount = 0;
+ int xAmount = 0, yAmount = 0;
if (objPos.x >= scrollerRect.right) {
xAmount = 8;
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 97857ac..eb7adbe 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -1483,7 +1483,6 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
const char *nextWord = NULL;
const char *sStart = s;
int numChars = 1;
- int strWidth = 1;
char nextChar;
for (;;) {
@@ -1497,7 +1496,7 @@ int GfxFont::getStringFit(const char *&s, int maxWidth) {
nextWord = s;
}
- strWidth = getStringWidth(sStart, numChars);
+ int strWidth = getStringWidth(sStart, numChars);
if (strWidth > maxWidth) {
if (nextWord) {
s = nextWord;
More information about the Scummvm-git-logs
mailing list