Optimize parameter passing to avoid unnecessary copying

This commit is contained in:
Pugemon
2024-06-07 04:00:38 +03:00
parent 46ca1bb04a
commit f25a425cb9
123 changed files with 578 additions and 522 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
#include "TrackBar.hpp"
#include <utility>
#include "../../core/DrawContext.hpp"
#include "../../core/Batch2D.hpp"
#include "../../../assets/Assets.hpp"
@@ -41,11 +43,11 @@ void TrackBar::draw(const DrawContext* pctx, Assets*) {
}
void TrackBar::setSupplier(doublesupplier supplier) {
this->supplier = supplier;
this->supplier = std::move(supplier);
}
void TrackBar::setConsumer(doubleconsumer consumer) {
this->consumer = consumer;
this->consumer = std::move(consumer);
}
void TrackBar::mouseMove(GUI*, int x, int) {