mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-09 03:23:59 -05:00
Remove unnecessary const qualifier, unused variable
This commit is contained in:
parent
78a9bac307
commit
ee986b8e56
|
|
@ -84,7 +84,7 @@ public:
|
|||
void openScript(QString label);
|
||||
void removeEvent(Event *);
|
||||
void addEvent(Event *);
|
||||
int getIndexOfEvent(const Event *) const;
|
||||
int getIndexOfEvent(Event *) const;
|
||||
|
||||
void deleteConnections();
|
||||
QList<MapConnection*> getConnections() const;
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void Map::addEvent(Event *event) {
|
|||
if (!m_ownedEvents.contains(event)) m_ownedEvents.insert(event);
|
||||
}
|
||||
|
||||
int Map::getIndexOfEvent(const Event *event) const {
|
||||
int Map::getIndexOfEvent(Event *event) const {
|
||||
return m_events.value(event->getEventGroup()).indexOf(event);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,8 +177,6 @@ void Layout::setDimensions(int newWidth, int newHeight, bool setNewBlockdata, bo
|
|||
}
|
||||
|
||||
void Layout::adjustDimensions(QMargins margins, bool setNewBlockdata) {
|
||||
int oldWidth = this->width;
|
||||
int oldHeight = this->height;
|
||||
int newWidth = this->width + margins.left() + margins.right();
|
||||
int newHeight = this->height + margins.top() + margins.bottom();
|
||||
|
||||
|
|
@ -190,7 +188,7 @@ void Layout::adjustDimensions(QMargins margins, bool setNewBlockdata) {
|
|||
if ((x < margins.left()) || (x >= newWidth - margins.right()) || (y < margins.top()) || (y >= newHeight - margins.bottom())) {
|
||||
newBlockdata.append(0);
|
||||
} else {
|
||||
int index = (y - margins.top()) * oldWidth + (x - margins.left());
|
||||
int index = (y - margins.top()) * this->width + (x - margins.left());
|
||||
newBlockdata.append(this->blockdata.value(index));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2192,7 +2192,7 @@ void Editor::deleteSelectedEvents() {
|
|||
// If deleting multiple events, just let editor work out next selected.
|
||||
Event *nextSelectedEvent = nullptr;
|
||||
if (eventsToDelete.length() == 1) {
|
||||
const Event *eventToDelete = eventsToDelete.first();
|
||||
Event *eventToDelete = eventsToDelete.first();
|
||||
Event::Group event_group = eventToDelete->getEventGroup();
|
||||
int index = this->map->getIndexOfEvent(eventToDelete);
|
||||
if (index != this->map->getNumEvents(event_group) - 1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user