Make iterate() static inline (#1451)
author서상민/동작제어Lab(SR)/Staff Engineer/삼성전자 <sangmin7.seo@samsung.com>
Thu, 31 May 2018 00:47:06 +0000 (09:47 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 31 May 2018 00:47:06 +0000 (09:47 +0900)
This patch makes iterate() static inline function in order to avoid
multiple definition issue that could be caused when IndexIterator.h is
included in multiple files.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
include/util/feature/IndexIterator.h

index dd029f4..084d29f 100644 (file)
@@ -55,7 +55,7 @@ private:
   const Shape _shape;
 };
 
-IndexIterator iterate(const Shape &shape) { return IndexIterator{shape}; }
+static inline IndexIterator iterate(const Shape &shape) { return IndexIterator{shape}; }
 
 template <typename Callable> IndexIterator &operator<<(IndexIterator &&it, Callable cb)
 {