FULLPIPE: Remove unnecessary constructors

These appear to be default member-wise copy constructors or POD
constructors that zero all members. I suspect that quite a few
pointer-taking constructors are actually supposed to be
copy-constructors but since they don't all just do default
member-wise copies I do not feel confident in changing them without
verifying that there are not separate copy constructors in the
disassembly, and I don't have the database for this game.
This commit is contained in:
Colin Snover 2017-11-16 10:32:47 -06:00 committed by Eugene Sandulenko
parent 715d4bd76a
commit a475cec2aa
5 changed files with 3 additions and 57 deletions

View file

@ -71,7 +71,7 @@ void setInputDisabled(bool state) {
}
void InputController::addCursor(CursorInfo *cursor) {
CursorInfo *newc = new CursorInfo(cursor);
CursorInfo *newc = new CursorInfo(*cursor);
const Dims dims = cursor->picture->getDimensions();
newc->width = dims.x;
@ -119,28 +119,6 @@ void InputController::setCursor(int cursorId) {
}
}
CursorInfo::CursorInfo() {
pictureId = 0;
picture = 0;
hotspotX = 0;
hotspotY = 0;
itemPictureOffsX = 0;
itemPictureOffsY = 0;
width = 0;
height = 0;
}
CursorInfo::CursorInfo(CursorInfo *src) {
pictureId = src->pictureId;
picture = src->picture;
hotspotX = src->hotspotX;
hotspotY = src->hotspotY;
itemPictureOffsX = src->itemPictureOffsX;
itemPictureOffsY = src->itemPictureOffsY;
width = src->width;
height = src->height;
}
void FullpipeEngine::setCursor(int id) {
if (_inputController)
_inputController->setCursor(id);