diff --git a/luna/include/luna/LinkedList.h b/luna/include/luna/LinkedList.h index 6a899ea1..c390f986 100644 --- a/luna/include/luna/LinkedList.h +++ b/luna/include/luna/LinkedList.h @@ -2,13 +2,6 @@ #include #include -template inline Option nonnull_or_empty_option(T* ptr) -{ - if (ptr == nullptr) return {}; - else - return ptr; -} - template class LinkedList; template class LinkedListNode diff --git a/luna/include/luna/Option.h b/luna/include/luna/Option.h index 2173b704..8dcf4521 100644 --- a/luna/include/luna/Option.h +++ b/luna/include/luna/Option.h @@ -142,4 +142,11 @@ template class Option }; Storage m_storage; bool m_has_value { false }; -}; \ No newline at end of file +}; + +template inline Option nonnull_or_empty_option(T* ptr) +{ + if (ptr == nullptr) return {}; + else + return ptr; +} \ No newline at end of file