From 9d0b5f82c2734444145718f12788f2dde436ef45 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 1 May 2019 13:03:59 +0100 Subject: COMPMID-2177 Fix clang warnings Change-Id: I78039db8c58d7b14a042c41e54c25fb9cb509bf7 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/1092 Reviewed-by: VidhyaSudhan Loganathan Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/runtime/CL/CLPyramid.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/runtime/CL/CLPyramid.cpp') diff --git a/src/runtime/CL/CLPyramid.cpp b/src/runtime/CL/CLPyramid.cpp index 865f389f7f..6d5dba0031 100644 --- a/src/runtime/CL/CLPyramid.cpp +++ b/src/runtime/CL/CLPyramid.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -35,7 +35,7 @@ using namespace arm_compute; CLPyramid::CLPyramid() - : _info(), _pyramid(nullptr) + : _info(), _pyramid() { } @@ -51,8 +51,8 @@ void CLPyramid::init_auto_padding(const PyramidInfo &info) void CLPyramid::internal_init(const PyramidInfo &info, bool auto_padding) { - _info = info; - _pyramid = arm_compute::support::cpp14::make_unique(_info.num_levels()); + _info = info; + _pyramid.resize(_info.num_levels()); size_t w = _info.width(); size_t h = _info.height(); @@ -109,11 +109,9 @@ void CLPyramid::internal_init(const PyramidInfo &info, bool auto_padding) void CLPyramid::allocate() { - ARM_COMPUTE_ERROR_ON(_pyramid == nullptr); - for(size_t i = 0; i < _info.num_levels(); ++i) { - (_pyramid.get() + i)->allocator()->allocate(); + _pyramid[i].allocator()->allocate(); } } @@ -126,5 +124,5 @@ CLTensor *CLPyramid::get_pyramid_level(size_t index) const { ARM_COMPUTE_ERROR_ON(index >= _info.num_levels()); - return (_pyramid.get() + index); + return &_pyramid[index]; } -- cgit v1.2.1