diff --git a/components/structures/include/ftl/data/new_frame.hpp b/components/structures/include/ftl/data/new_frame.hpp index 11cc408649bf7437466826d8c39f595161473e07..48c18ed8b6c4c672ff994f3ad4d4714b31c42a06 100644 --- a/components/structures/include/ftl/data/new_frame.hpp +++ b/components/structures/include/ftl/data/new_frame.hpp @@ -55,7 +55,7 @@ class Frame { const T &get(ftl::codecs::Channel c) const; template <typename T> - const T *getPtr(ftl::codecs::Channel c) const; + const T *getPtr(ftl::codecs::Channel c) const noexcept; template <typename T> T *getMutable(ftl::codecs::Channel c); @@ -136,7 +136,7 @@ bool ftl::data::Frame::isType(ftl::codecs::Channel c) { } template <typename T> -const T *ftl::data::Frame::getPtr(ftl::codecs::Channel c) const { +const T *ftl::data::Frame::getPtr(ftl::codecs::Channel c) const noexcept { auto i = data_.find(c); if (i != data_.end()) { return std::any_cast<T>(&i->second); diff --git a/components/structures/test/frame_unit.cpp b/components/structures/test/frame_unit.cpp index af9c9387d36f7de3ad2ae9d4770f123b8cf7e551..da8ffca5905337bc68c2716c9f4cb1f37112ebfa 100644 --- a/components/structures/test/frame_unit.cpp +++ b/components/structures/test/frame_unit.cpp @@ -277,13 +277,13 @@ TestB &ftl::data::Frame::create<TestB>(ftl::codecs::Channel c, const TestB &b) { } template <> -const TestA *ftl::data::Frame::getPtr<TestA>(ftl::codecs::Channel c) const { +const TestA *ftl::data::Frame::getPtr<TestA>(ftl::codecs::Channel c) const noexcept { auto *ptr = getPtr<TestC>(c); return (ptr) ? &ptr->a : nullptr; } template <> -const TestB *ftl::data::Frame::getPtr<TestB>(ftl::codecs::Channel c) const { +const TestB *ftl::data::Frame::getPtr<TestB>(ftl::codecs::Channel c) const noexcept { auto *ptr = getPtr<TestC>(c); return (ptr) ? &ptr->b : nullptr; }