diff options
author | Colin Snover | 2017-11-14 22:30:35 -0600 |
---|---|---|
committer | Eugene Sandulenko | 2017-11-18 22:35:12 +0100 |
commit | e2367f3ed2060b273559200b3e40f75a98bb6a6f (patch) | |
tree | cfea744f09c075bedb9b3f4a3e9489bf5b14d829 /engines/fullpipe/gfx.cpp | |
parent | 39ea2f66ac635613c3a817c16f80b11ac207d320 (diff) | |
download | scummvm-rg350-e2367f3ed2060b273559200b3e40f75a98bb6a6f.tar.gz scummvm-rg350-e2367f3ed2060b273559200b3e40f75a98bb6a6f.tar.bz2 scummvm-rg350-e2367f3ed2060b273559200b3e40f75a98bb6a6f.zip |
FULLPIPE: Remove unnecessary and unsafe C-style casts
Diffstat (limited to 'engines/fullpipe/gfx.cpp')
-rw-r--r-- | engines/fullpipe/gfx.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index da626c7f1f..b12edcb621 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -300,8 +300,8 @@ void GameObject::renumPictures(Common::Array<StaticANIObject *> *lst) { int *buf = (int *)calloc(lst->size() + 2, sizeof(int)); for (uint i = 0; i < lst->size(); i++) { - if (_id == ((GameObject *)((*lst)[i]))->_id) - buf[((GameObject *)((*lst)[i]))->_odelay] = 1; + if (_id == (*lst)[i]->_id) + buf[(*lst)[i]->_odelay] = 1; } if (buf[_odelay]) { @@ -318,8 +318,8 @@ void GameObject::renumPictures(Common::Array<PictureObject *> *lst) { int *buf = (int *)calloc(lst->size() + 2, sizeof(int)); for (uint i = 0; i < lst->size(); i++) { - if (_id == ((GameObject *)((*lst)[i]))->_id) - buf[((GameObject *)((*lst)[i]))->_odelay] = 1; + if (_id == (*lst)[i]->_id) + buf[(*lst)[i]->_odelay] = 1; } if (buf[_odelay]) { @@ -348,7 +348,7 @@ bool GameObject::getPicAniInfo(PicAniInfo *info) { } if (_objtype == kObjTypeStaticANIObject) { - StaticANIObject *ani = (StaticANIObject *)this; + StaticANIObject *ani = static_cast<StaticANIObject *>(this); info->type = (ani->_messageQueueId << 16) | 1; info->objectId = ani->_id; @@ -398,8 +398,8 @@ bool GameObject::setPicAniInfo(PicAniInfo *picAniInfo) { return true; } - if (picAniInfo->type & 1) { - StaticANIObject *ani = (StaticANIObject *)this; + if (picAniInfo->type & 1 && _objtype == kObjTypeStaticANIObject) { + StaticANIObject *ani = static_cast<StaticANIObject *>(this); ani->_messageQueueId = (picAniInfo->type >> 16) & 0xffff; ani->_odelay = picAniInfo->field_8; |