Skip to content

Commit

Permalink
TSAGE: Silent some CppCheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Feb 8, 2014
1 parent 1ba4cce commit 074c11f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions engines/tsage/core.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions engines/tsage/graphics.cpp
Expand Up @@ -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 (;;) {
Expand All @@ -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;
Expand Down

0 comments on commit 074c11f

Please sign in to comment.