mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-11 11:45:21 +00:00
BAGEL: Fix several PVS studio issues
This commit is contained in:
parent
9b58b79ad1
commit
3aba291b72
@ -316,7 +316,7 @@ void CBagPanBitmap::setCorrWidth(int nWidth, bool bUpdate) {
|
||||
while (nWidth >>= 1)
|
||||
++i;
|
||||
|
||||
if (i >= 0 && i < 6) {
|
||||
if (i < 6) {
|
||||
_nCorrWidth = i;
|
||||
if (bUpdate) {
|
||||
generateCosineTable();
|
||||
|
@ -282,7 +282,6 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
|
||||
showLog();
|
||||
}
|
||||
|
||||
bool bUpdate = true;
|
||||
bool bIsMovieWaiting = isMovieWaiting();
|
||||
bool bMoviePlaying = false;
|
||||
|
||||
@ -300,13 +299,10 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
|
||||
} else if (_pdaMode == PDA_MOO_MODE) {
|
||||
// If we're playing a pda movie, then make sure we continue to update.
|
||||
bMoviePlaying = true;
|
||||
bUpdate = true;
|
||||
}
|
||||
|
||||
// If the official decree from on high has been given to update, do so!
|
||||
if (bUpdate) {
|
||||
errorCode = CBagStorageDevBmp::update(pBmp, pt, pr, _nMaskColor);
|
||||
}
|
||||
errorCode = CBagStorageDevBmp::update(pBmp, pt, pr, _nMaskColor);
|
||||
|
||||
// If the PDA is activating then redraw our black background
|
||||
bool bWandAnimating = CBagCharacterObject::pdaWandAnimating();
|
||||
|
@ -161,7 +161,6 @@ CBagRPObject::~CBagRPObject() {
|
||||
_pSaveVar = nullptr;
|
||||
|
||||
// Clear our statics, yes, I mean to do that here.
|
||||
_turnCount = nullptr;
|
||||
_pLogStateVar = nullptr;
|
||||
_pPrevLogStateVar = nullptr;
|
||||
_pBarLogPages = nullptr;
|
||||
@ -1496,7 +1495,6 @@ bool CBagRPObject::initialize() {
|
||||
// Cruise the dossier's for both lists and get pointers to the actual bagdoobj's.
|
||||
// Search the current storage device for this object.
|
||||
CBagStorageDev *pSDev;
|
||||
DossierObj *pDosObj;
|
||||
|
||||
if (zoomed()) {
|
||||
pSDev = g_SDevManager->getStorageDevice(LOGZ_WLD);
|
||||
@ -1508,6 +1506,7 @@ bool CBagRPObject::initialize() {
|
||||
// Scoff the dossier out of the LOG_WLD SDEV. If it's not there then hurl.
|
||||
bool bDoUntouched = (_pTouchedList != _pUntouchedList);
|
||||
int nCount = _pTouchedList->getCount();
|
||||
DossierObj *pDosObj = nullptr;
|
||||
|
||||
for (int i = 0; i < nCount; i++) {
|
||||
pDosObj = _pTouchedList->getNodeItem(i);
|
||||
@ -1555,17 +1554,16 @@ bool CBagRPObject::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
// If we have a object name, make sure it is not active. Object name is the
|
||||
// Make sure the object is not active. Object name is the
|
||||
// line that shows up in the RP Review screen (such as "Voice Printer")
|
||||
if (_pObjectName) {
|
||||
// Give the dossier a back pointer so that it can respond to
|
||||
// mouse down events
|
||||
_pObjectName->setRPObject(this);
|
||||
|
||||
_pObjectName->setVisible(false);
|
||||
_pObjectName->setActive(false);
|
||||
_pObjectName->setFloating(false);
|
||||
}
|
||||
// Give the dossier a back pointer so that it can respond to
|
||||
// mouse down events
|
||||
_pObjectName->setRPObject(this);
|
||||
|
||||
_pObjectName->setVisible(false);
|
||||
_pObjectName->setActive(false);
|
||||
_pObjectName->setFloating(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user