mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
ULTIMA8: Remove unneeded initializations identified by xcode
This commit is contained in:
parent
cacc668cec
commit
d90db0e467
@ -505,7 +505,6 @@ void ContainerGump::DropItem(Item *item, int mx, int my) {
|
||||
|
||||
// combined, so delete item
|
||||
item->destroy();
|
||||
item = nullptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -111,12 +111,9 @@ void ItemRelativeGump::GumpToParent(int32 &gx, int32 &gy, PointRoundDir r) {
|
||||
}
|
||||
|
||||
void ItemRelativeGump::GetItemLocation(int32 lerp_factor) {
|
||||
Item *it = nullptr;
|
||||
Item *next = nullptr;
|
||||
Item *prev = nullptr;
|
||||
Gump *gump = nullptr;
|
||||
|
||||
it = getItem(_owner);
|
||||
Item *it = getItem(_owner);
|
||||
|
||||
if (!it) {
|
||||
// This shouldn't ever happen, the GumpNotifyProcess should
|
||||
@ -125,6 +122,8 @@ void ItemRelativeGump::GetItemLocation(int32 lerp_factor) {
|
||||
return;
|
||||
}
|
||||
|
||||
Item *next;
|
||||
Item *prev;
|
||||
while ((next = it->getParentAsContainer()) != nullptr) {
|
||||
prev = it;
|
||||
it = next;
|
||||
|
@ -61,7 +61,7 @@ MainActor::~MainActor() {
|
||||
}
|
||||
|
||||
GravityProcess *MainActor::ensureGravityProcess() {
|
||||
AvatarGravityProcess *p = nullptr;
|
||||
AvatarGravityProcess *p;
|
||||
if (_gravityPid) {
|
||||
p = p_dynamic_cast<AvatarGravityProcess *>(
|
||||
Kernel::get_instance()->getProcess(_gravityPid));
|
||||
|
@ -1452,7 +1452,7 @@ int32 Item::ascend(int delta) {
|
||||
}
|
||||
|
||||
GravityProcess *Item::ensureGravityProcess() {
|
||||
GravityProcess *p = nullptr;
|
||||
GravityProcess *p;
|
||||
if (_gravityPid) {
|
||||
p = p_dynamic_cast<GravityProcess *>(
|
||||
Kernel::get_instance()->getProcess(_gravityPid));
|
||||
|
@ -75,7 +75,6 @@ void SplitItemProcess::run() {
|
||||
targetitem->callUsecodeEvent_combine();
|
||||
} else {
|
||||
targetitem->destroy();
|
||||
targetitem = nullptr;
|
||||
}
|
||||
|
||||
if (origcount > 0) {
|
||||
@ -83,7 +82,6 @@ void SplitItemProcess::run() {
|
||||
original->callUsecodeEvent_combine();
|
||||
} else {
|
||||
original->destroy(); // note: this terminates us
|
||||
original = nullptr;
|
||||
}
|
||||
|
||||
_result = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user