From b21a3ae9198ff0e09264914df34003df2a37dc99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20Vostokov/AI=20Tools=20Lab/Staff=20Engineer/?= =?utf8?q?=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 5 Jun 2018 12:01:04 +0300 Subject: [PATCH] Fix issue "no return statement in function return non-void" (#304) Fix issue "no return statement in function return non-void" This commit fix issue for two classes nncc:core:ADT:tensor:Index::resize() and nncc::core::ADT::tensor::Shape::resize() Signed-off-by: Sergey Vostokov --- libs/core/src/ADT/tensor/Index.cpp | 6 +++++- libs/core/src/ADT/tensor/Shape.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/core/src/ADT/tensor/Index.cpp b/libs/core/src/ADT/tensor/Index.cpp index 4433f1c..6942601 100644 --- a/libs/core/src/ADT/tensor/Index.cpp +++ b/libs/core/src/ADT/tensor/Index.cpp @@ -17,7 +17,11 @@ Index::Index(std::initializer_list &&l) : _indices{l} } uint32_t Index::rank(void) const { return _indices.size(); } -Index &Index::resize(uint32_t size) { _indices.resize(size); } +Index &Index::resize(uint32_t size) +{ + _indices.resize(size); + return *this; +} Index &Index::fill(uint32_t index) { diff --git a/libs/core/src/ADT/tensor/Shape.cpp b/libs/core/src/ADT/tensor/Shape.cpp index 97df5d2..1b0296a 100644 --- a/libs/core/src/ADT/tensor/Shape.cpp +++ b/libs/core/src/ADT/tensor/Shape.cpp @@ -17,7 +17,11 @@ Shape::Shape(std::initializer_list &&l) : _dims{l} } uint32_t Shape::rank(void) const { return _dims.size(); } -Shape &Shape::resize(uint32_t size) { _dims.resize(size); } +Shape &Shape::resize(uint32_t size) +{ + _dims.resize(size); + return *this; +} uint32_t &Shape::dim(uint32_t axis) { return _dims.at(axis); } uint32_t Shape::dim(uint32_t axis) const { return _dims.at(axis); } -- 2.7.4