From 01910f32f091debc62a8151b3bbde919d95d3fb3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 30 Jul 2016 17:45:50 -0400 Subject: TITANIC: Fix identified warnings --- engines/titanic/pet_control/pet_control.cpp | 2 +- engines/titanic/pet_control/pet_control.h | 2 +- engines/titanic/pet_control/pet_conversations.cpp | 2 +- engines/titanic/pet_control/pet_conversations.h | 2 +- engines/titanic/pet_control/pet_inventory.cpp | 2 +- engines/titanic/pet_control/pet_inventory.h | 2 +- engines/titanic/pet_control/pet_rooms.cpp | 2 +- engines/titanic/pet_control/pet_rooms.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/titanic/pet_control') diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 83081456d1..b32a7907a4 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -142,7 +142,7 @@ void CPetControl::draw(CScreenManager *screenManager) { } } -Rect CPetControl::getBounds() { +Rect CPetControl::getBounds() const { return _sections[_currentArea]->getBounds(); } diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 362fc11f6e..ef7e49d4e4 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -143,7 +143,7 @@ public: /** * Gets the bounds occupied by the item */ - virtual Rect getBounds(); + virtual Rect getBounds() const; /** * Setups the sections within the PET diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp index 0a8a71bf94..9bae8e7070 100644 --- a/engines/titanic/pet_control/pet_conversations.cpp +++ b/engines/titanic/pet_control/pet_conversations.cpp @@ -130,7 +130,7 @@ void CPetConversations::draw(CScreenManager *screenManager) { _npcIcons[_npcNum].draw(screenManager); } -Rect CPetConversations::getBounds() { +Rect CPetConversations::getBounds() const { Rect rect = _dials[0].getBounds(); rect.combine(_dials[1].getBounds()); rect.combine(_dials[2].getBounds()); diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h index 62cddd4008..9e8b093d62 100644 --- a/engines/titanic/pet_control/pet_conversations.h +++ b/engines/titanic/pet_control/pet_conversations.h @@ -160,7 +160,7 @@ public: /** * Get the bounds for the section */ - virtual Rect getBounds(); + virtual Rect getBounds() const; /** * Returns true if the object is in a valid state diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp index 2f8125cfac..2fb60bf9a6 100644 --- a/engines/titanic/pet_control/pet_inventory.cpp +++ b/engines/titanic/pet_control/pet_inventory.cpp @@ -53,7 +53,7 @@ void CPetInventory::draw(CScreenManager *screenManager) { _text.draw(screenManager); } -Rect CPetInventory::getBounds() { +Rect CPetInventory::getBounds() const { return _movie ? _movie->getBounds() : Rect(); } diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h index 9e074dd89b..17649546ce 100644 --- a/engines/titanic/pet_control/pet_inventory.h +++ b/engines/titanic/pet_control/pet_inventory.h @@ -79,7 +79,7 @@ public: /** * Get the bounds for the section */ - virtual Rect getBounds(); + virtual Rect getBounds() const; /** * Called when a general change occurs diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index 2d731130e9..dfaa0405e4 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -172,7 +172,7 @@ CPetText *CPetRooms::getText() { return &_text; } -CGameObject *CPetRooms::getBackground(int index) { +CGameObject *CPetRooms::getBackground(int index) const { switch (index) { case 8: return _chevLeftOnDim; diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index b82b42ca8b..ba3356091a 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -145,7 +145,7 @@ public: /** * Special retrieval of glyph background image */ - virtual CGameObject *getBackground(int index); + virtual CGameObject *getBackground(int index) const; /** * Reset the highlight -- cgit v1.2.3