Skip to content

Commit

Permalink
Remove unnecessary const qualifier, unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Feb 12, 2025
1 parent 78a9bac commit 11d94a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/core/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Map : public QObject
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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 1 addition & 3 deletions src/core/maplayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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));
}
}
Expand Down

0 comments on commit 11d94a0

Please sign in to comment.