From 94e1c64dff527c46c6f8d6ba25df9f28d7d56898 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sun, 13 Dec 2020 15:24:31 +0100
Subject: [PATCH] fix: Module type always empty string
The change in #2270 accidentally broke how we access module types.
module::TYPE always points to the module superclass and it thus
accesses its empty TYPE field.
This mainly broke legacy action handling.
Ref #2270
---
include/modules/meta/base.hpp | 2 --
include/modules/meta/base.inl | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/modules/meta/base.hpp b/include/modules/meta/base.hpp
index 9d776c97..420ff52a 100644
--- a/include/modules/meta/base.hpp
+++ b/include/modules/meta/base.hpp
@@ -148,8 +148,6 @@ namespace modules {
bool input(const string& action, const string& data);
- static constexpr auto TYPE = "";
-
protected:
void broadcast();
void idle();
diff --git a/include/modules/meta/base.inl b/include/modules/meta/base.inl
index 6792c02f..c6f0fdb4 100644
--- a/include/modules/meta/base.inl
+++ b/include/modules/meta/base.inl
@@ -48,7 +48,7 @@ namespace modules {
template
string module::type() const {
- return string(module::TYPE);
+ return string(Impl::TYPE);
}
template