]> git.tdb.fi Git - libs/core.git/commitdiff
Mark the functions in algorithm.h as inline
authorMikko Rasa <tdb@tdb.fi>
Sun, 25 Mar 2018 11:20:30 +0000 (14:20 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 25 Mar 2018 11:27:50 +0000 (14:27 +0300)
source/core/algorithm.h

index 5d75763d2617697fcf3b009e587ce84a4b327a42..69ec390908793a7e299cba81115b30c93e68cc79 100644 (file)
@@ -6,25 +6,25 @@
 namespace Msp {
 
 template<typename Container, typename T>
 namespace Msp {
 
 template<typename Container, typename T>
-typename Container::iterator find(Container &cont, const T &value)
+inline typename Container::iterator find(Container &cont, const T &value)
 {
        return std::find(cont.begin(), cont.end(), value);
 }
 
 template<typename Container, typename T>
 {
        return std::find(cont.begin(), cont.end(), value);
 }
 
 template<typename Container, typename T>
-typename Container::const_iterator find(const Container &cont, const T &value)
+inline typename Container::const_iterator find(const Container &cont, const T &value)
 {
        return std::find(cont.begin(), cont.end(), value);
 }
 
 template<typename Container, typename Predicate>
 {
        return std::find(cont.begin(), cont.end(), value);
 }
 
 template<typename Container, typename Predicate>
-typename Container::iterator find_if(Container &cont, Predicate pred)
+inline typename Container::iterator find_if(Container &cont, Predicate pred)
 {
        return std::find_if(cont.begin(), cont.end(), pred);
 }
 
 template<typename Container, typename Predicate>
 {
        return std::find_if(cont.begin(), cont.end(), pred);
 }
 
 template<typename Container, typename Predicate>
-typename Container::const_iterator find_if(const Container &cont, Predicate pred)
+inline typename Container::const_iterator find_if(const Container &cont, Predicate pred)
 {
        return std::find_if(cont.begin(), cont.end(), pred);
 }
 {
        return std::find_if(cont.begin(), cont.end(), pred);
 }