|
@@ -41,7 +41,7 @@ class Dispatcher final {
|
|
|
template<typename Event>
|
|
template<typename Event>
|
|
|
struct SignalWrapper final: BaseSignalWrapper {
|
|
struct SignalWrapper final: BaseSignalWrapper {
|
|
|
void publish(std::size_t current) override {
|
|
void publish(std::size_t current) override {
|
|
|
- for(auto &&event: events[current]) {
|
|
|
|
|
|
|
+ for(const auto &event: events[current]) {
|
|
|
signal.publish(event);
|
|
signal.publish(event);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -79,7 +79,7 @@ class Dispatcher final {
|
|
|
|
|
|
|
|
template<typename Event>
|
|
template<typename Event>
|
|
|
SignalWrapper<Event> & wrapper() {
|
|
SignalWrapper<Event> & wrapper() {
|
|
|
- auto type = event_family::type<Event>();
|
|
|
|
|
|
|
+ const auto type = event_family::type<Event>();
|
|
|
|
|
|
|
|
if(!(type < wrappers.size())) {
|
|
if(!(type < wrappers.size())) {
|
|
|
wrappers.resize(type + 1);
|
|
wrappers.resize(type + 1);
|
|
@@ -178,7 +178,7 @@ public:
|
|
|
* to reduce at a minimum the time spent in the bodies of the listeners.
|
|
* to reduce at a minimum the time spent in the bodies of the listeners.
|
|
|
*/
|
|
*/
|
|
|
void update() {
|
|
void update() {
|
|
|
- auto buf = buffer(mode);
|
|
|
|
|
|
|
+ const auto buf = buffer(mode);
|
|
|
mode = !mode;
|
|
mode = !mode;
|
|
|
|
|
|
|
|
for(auto &&wrapper: wrappers) {
|
|
for(auto &&wrapper: wrappers) {
|