SHERLOCK: RT: Fix Coverity problems
This commit is contained in:
parent
29a53493ac
commit
e4b4fd0493
6 changed files with 10 additions and 10 deletions
|
@ -1016,6 +1016,7 @@ StreamingImageFile::StreamingImageFile() {
|
||||||
_flags = 0;
|
_flags = 0;
|
||||||
_scaleVal = 0;
|
_scaleVal = 0;
|
||||||
_zPlacement = 0;
|
_zPlacement = 0;
|
||||||
|
_compressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
StreamingImageFile::~StreamingImageFile() {
|
StreamingImageFile::~StreamingImageFile() {
|
||||||
|
|
|
@ -30,13 +30,13 @@ namespace Sherlock {
|
||||||
|
|
||||||
InventoryItem::InventoryItem(int requiredFlag, const Common::String &name,
|
InventoryItem::InventoryItem(int requiredFlag, const Common::String &name,
|
||||||
const Common::String &description, const Common::String &examine) :
|
const Common::String &description, const Common::String &examine) :
|
||||||
_requiredFlag(requiredFlag), _name(name), _description(description),
|
_requiredFlag(requiredFlag), _requiredFlag1(0), _name(name), _description(description),
|
||||||
_examine(examine), _lookFlag(0) {
|
_examine(examine), _lookFlag(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoryItem::InventoryItem(int requiredFlag, const Common::String &name,
|
InventoryItem::InventoryItem(int requiredFlag, const Common::String &name,
|
||||||
const Common::String &description, const Common::String &examine, const Common::String &verbName) :
|
const Common::String &description, const Common::String &examine, const Common::String &verbName) :
|
||||||
_requiredFlag(requiredFlag), _name(name), _description(description),
|
_requiredFlag(requiredFlag), _requiredFlag1(0), _name(name), _description(description),
|
||||||
_examine(examine), _lookFlag(0) {
|
_examine(examine), _lookFlag(0) {
|
||||||
_verb._verb = verbName;
|
_verb._verb = verbName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,11 @@ Journal *Journal::init(SherlockEngine *vm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Journal::Journal(SherlockEngine *vm) : _vm(vm) {
|
Journal::Journal(SherlockEngine *vm) : _vm(vm) {
|
||||||
|
_up = _down = false;
|
||||||
|
_index = 0;
|
||||||
|
_page = 0;
|
||||||
|
_maxPage = 0;
|
||||||
|
_sub = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Journal::drawJournal(int direction, int howFar) {
|
bool Journal::drawJournal(int direction, int howFar) {
|
||||||
|
|
|
@ -450,12 +450,6 @@ bool Music::playMusic(const Common::String &name) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (dataSize < 4) {
|
|
||||||
warning("Music: expected music header not found in music file");
|
|
||||||
delete[] midiMusicData;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (memcmp("FORM", dataPos, 4)) {
|
if (memcmp("FORM", dataPos, 4)) {
|
||||||
warning("Music: expected header not found in music file");
|
warning("Music: expected header not found in music file");
|
||||||
delete[] midiMusicData;
|
delete[] midiMusicData;
|
||||||
|
|
|
@ -85,7 +85,7 @@ void ScalpelInventory::drawInventory(InvNewMode mode) {
|
||||||
|
|
||||||
if (tempMode == INVENTORY_DONT_DISPLAY)
|
if (tempMode == INVENTORY_DONT_DISPLAY)
|
||||||
mode = LOOK_INVENTORY_MODE;
|
mode = LOOK_INVENTORY_MODE;
|
||||||
_invMode = (InvMode)mode;
|
_invMode = (InvMode)((int)mode);
|
||||||
|
|
||||||
if (mode != PLAIN_INVENTORY) {
|
if (mode != PLAIN_INVENTORY) {
|
||||||
ui._oldKey = INVENTORY_COMMANDS[(int)mode];
|
ui._oldKey = INVENTORY_COMMANDS[(int)mode];
|
||||||
|
|
|
@ -173,7 +173,7 @@ void WidgetVerbs::handleEvents() {
|
||||||
_outsideMenu = true;
|
_outsideMenu = true;
|
||||||
|
|
||||||
// See if they released the mouse button
|
// See if they released the mouse button
|
||||||
if (events._released || events._released) {
|
if (events._released || events._rightReleased) {
|
||||||
// See if they want to close the menu (they clicked outside of the menu)
|
// See if they want to close the menu (they clicked outside of the menu)
|
||||||
if (!_bounds.contains(mousePos)) {
|
if (!_bounds.contains(mousePos)) {
|
||||||
if (_outsideMenu) {
|
if (_outsideMenu) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue