summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tablemodel.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-07 12:40:35 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-29 17:16:37 +0100
commit93ad5ec32de124dfa0c054acfd1f2a378cb9ca75 (patch)
treebfe8e842a780cd87ee105806f4112e01784ff7fc /src/gui/widgets/tablemodel.h
parent63fffadacc51fb7c4915361f0286682e08a55cb1 (diff)
downloadmana-93ad5ec32de124dfa0c054acfd1f2a378cb9ca75.tar.gz
mana-93ad5ec32de124dfa0c054acfd1f2a378cb9ca75.tar.bz2
mana-93ad5ec32de124dfa0c054acfd1f2a378cb9ca75.tar.xz
mana-93ad5ec32de124dfa0c054acfd1f2a378cb9ca75.zip
Optimise PlayerRelationsManager::clear
Previous implementation was O(n^2), doing lots of work (saving file and updating UI) for each removed player.
Diffstat (limited to 'src/gui/widgets/tablemodel.h')
-rw-r--r--src/gui/widgets/tablemodel.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h
index 2e36992a..d4274e39 100644
--- a/src/gui/widgets/tablemodel.h
+++ b/src/gui/widgets/tablemodel.h
@@ -77,20 +77,19 @@ public:
*/
virtual gcn::Widget *getElementAt(int row, int column) const = 0;
- virtual void installListener(TableModelListener *listener);
-
- virtual void removeListener(TableModelListener *listener);
+ void installListener(TableModelListener *listener);
+ void removeListener(TableModelListener *listener);
protected:
/**
* Tells all listeners that the table is about to see an update
*/
- virtual void signalBeforeUpdate();
+ void signalBeforeUpdate();
/**
* Tells all listeners that the table has seen an update
*/
- virtual void signalAfterUpdate();
+ void signalAfterUpdate();
private:
std::set<TableModelListener *> listeners;