Skip to content
Snippets Groups Projects
Commit b2ded16e authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Minor changes

parent 6a4b1c51
Branches
Tags
No related merge requests found
Pipeline #27210 failed
......@@ -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);
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment