Skip to content

Commit f046828

Browse files
committed
gui: Mark returned selection const
Signed-off-by: Martin Povišer <[email protected]>
1 parent 932de9d commit f046828

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/gui/include/gui/gui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ class Gui
640640
void addSelectedInst(const char* name);
641641

642642
// Return the selected set
643-
SelectionSet& selection();
643+
const SelectionSet& selection();
644644

645645
// check if any object(inst/net) is present in sect/highlight set
646646
bool anyObjectInSet(bool selection_set, odb::dbObjectType obj_type) const;

src/gui/src/gui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ void Gui::addSelectedInst(const char* name)
334334
main_window->addSelected(makeSelected(inst));
335335
}
336336

337-
SelectionSet& Gui::selection()
337+
const SelectionSet& Gui::selection()
338338
{
339339
return main_window->selection();
340340
}

src/gui/src/mainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ void MainWindow::updateTitle()
530530
}
531531
}
532532

533-
SelectionSet& MainWindow::selection()
533+
const SelectionSet& MainWindow::selection()
534534
{
535535
return selected_;
536536
}

src/gui/src/mainWindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class MainWindow : public QMainWindow, public odb::dbDatabaseObserver
101101
void setTitle(const std::string& title);
102102

103103
// Return the selected set
104-
SelectionSet& selection();
104+
const SelectionSet& selection();
105105

106106
signals:
107107
// Signaled when we get a postRead callback to tell the sub-widgets

0 commit comments

Comments
 (0)