diff --git a/src/dsl/word/emit/UDP.hpp b/src/dsl/word/emit/UDP.hpp index 640bfacf3..d27d8450c 100644 --- a/src/dsl/word/emit/UDP.hpp +++ b/src/dsl/word/emit/UDP.hpp @@ -60,7 +60,7 @@ namespace dsl { template struct UDP { - static inline void emit(PowerPlant& /*powerplant*/, + static inline void emit(const PowerPlant& /*powerplant*/, std::shared_ptr data, const std::string& to_addr, in_port_t to_port, diff --git a/src/dsl/word/emit/Watchdog.hpp b/src/dsl/word/emit/Watchdog.hpp index 1374e9f6a..91607607e 100644 --- a/src/dsl/word/emit/Watchdog.hpp +++ b/src/dsl/word/emit/Watchdog.hpp @@ -166,7 +166,8 @@ namespace dsl { struct Watchdog { template - static void emit(PowerPlant& /*powerplant*/, WatchdogServicer& servicer) { + static void emit(const PowerPlant& /*powerplant*/, + WatchdogServicer& servicer) { // Update our service time servicer.service(); } diff --git a/tests/dsl/emit/EmitFusion.cpp b/tests/dsl/emit/EmitFusion.cpp index df14bbc3d..5eca9aea6 100644 --- a/tests/dsl/emit/EmitFusion.cpp +++ b/tests/dsl/emit/EmitFusion.cpp @@ -34,22 +34,28 @@ std::vector events; // NOLINT(cppcoreguidelines-avoid-non-const-gl template struct E1 { - static inline void emit(NUClear::PowerPlant& /*unused*/, std::shared_ptr p, const int& a, const std::string& b) { + static inline void emit(const NUClear::PowerPlant& /*powerplant*/, + std::shared_ptr p, + const int& a, + const std::string& b) { events.push_back("E1a " + *p + " " + std::to_string(a) + " " + b); } - static inline void emit(NUClear::PowerPlant& /*unused*/, std::shared_ptr p, const std::string& c) { + static inline void emit(const NUClear::PowerPlant& /*powerplant*/, std::shared_ptr p, const std::string& c) { events.push_back("E1b " + *p + " " + c); } }; template struct E2 { - static inline void emit(NUClear::PowerPlant& /*unused*/, std::shared_ptr p, const bool& d) { + static inline void emit(const NUClear::PowerPlant& /*powerplant*/, std::shared_ptr p, const bool& d) { events.push_back("E2a " + *p + " " + (d ? "true" : "false")); } - static inline void emit(NUClear::PowerPlant& /*unused*/, std::shared_ptr p, const int& e, const std::string& f) { + static inline void emit(const NUClear::PowerPlant& /*powerplant*/, + std::shared_ptr p, + const int& e, + const std::string& f) { events.push_back("E2b " + *p + " " + std::to_string(e) + " " + f); } };