COMPMID-2177 Fix clang warnings

Change-Id: I4beacfd714ee3ed771fd174cce5d8009a2961380
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1065
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/core/utils/logging/LoggerRegistry.h b/arm_compute/core/utils/logging/LoggerRegistry.h
index 066a42f..c841020 100644
--- a/arm_compute/core/utils/logging/LoggerRegistry.h
+++ b/arm_compute/core/utils/logging/LoggerRegistry.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -73,8 +73,8 @@
      * @param[in] log_level (Optional) Logger's log level. Defaults to INFO
      * @param[in] printers  (Optional) Printers to attach to the system loggers. Defaults with a @ref StdPrinter.
      */
-    void create_reserved_loggers(LogLevel                              log_level = LogLevel::INFO,
-                                 std::vector<std::shared_ptr<Printer>> printers  = { std::make_shared<StdPrinter>() });
+    void create_reserved_loggers(LogLevel                                     log_level = LogLevel::INFO,
+                                 const std::vector<std::shared_ptr<Printer>> &printers  = { std::make_shared<StdPrinter>() });
 
 private:
     /** Default constructor */
diff --git a/arm_compute/graph/Graph.h b/arm_compute/graph/Graph.h
index 2a77682..878976f 100644
--- a/arm_compute/graph/Graph.h
+++ b/arm_compute/graph/Graph.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -216,7 +216,7 @@
      *
      * @return Tensor ID
      */
-    TensorID create_tensor(TensorDescriptor desc = TensorDescriptor());
+    TensorID create_tensor(const TensorDescriptor &desc = TensorDescriptor());
 
 private:
     GraphID                              _id      = GraphID(0); /**< Graph id */
diff --git a/arm_compute/graph/GraphBuilder.h b/arm_compute/graph/GraphBuilder.h
index f1d387b..1d6ecc8 100644
--- a/arm_compute/graph/GraphBuilder.h
+++ b/arm_compute/graph/GraphBuilder.h
@@ -51,7 +51,7 @@
      *
      * @return Node ID of the created node, EmptyNodeID in case of error
      */
-    static NodeID add_const_node(Graph &g, NodeParams params, TensorDescriptor desc, ITensorAccessorUPtr accessor = nullptr);
+    static NodeID add_const_node(Graph &g, NodeParams params, const TensorDescriptor &desc, ITensorAccessorUPtr accessor = nullptr);
     /** Adds an input layer node to the graph
      *
      * @param[in] g        Graph to add the node to
@@ -61,7 +61,7 @@
      *
      * @return Node ID of the created node, EmptyNodeID in case of error
      */
-    static NodeID add_input_node(Graph &g, NodeParams params, TensorDescriptor desc, ITensorAccessorUPtr accessor = nullptr);
+    static NodeID add_input_node(Graph &g, NodeParams params, const TensorDescriptor &desc, ITensorAccessorUPtr accessor = nullptr);
     /** Adds an output layer node to the graph
      *
      * @param[in] g        Graph to add the node to
diff --git a/arm_compute/graph/Tensor.h b/arm_compute/graph/Tensor.h
index 54fb258..07eec1e 100644
--- a/arm_compute/graph/Tensor.h
+++ b/arm_compute/graph/Tensor.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -108,7 +108,7 @@
      *
      * @return Bound edges
      */
-    const std::set<EdgeID> bound_edges() const;
+    std::set<EdgeID> bound_edges() const;
 
 private:
     TensorID                         _id;          /**< Tensor id */
diff --git a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h b/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h
index 307ec49..da00f38 100644
--- a/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h
+++ b/arm_compute/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.h
@@ -60,9 +60,9 @@
     void run() override;
 
 private:
-    std::unique_ptr<GCDepthConcatenateLayerKernel[]> _concat_kernels_vector;
-    std::unique_ptr<GCFillBorderKernel[]>            _border_handlers_vector;
-    unsigned int                                     _num_inputs;
+    std::vector<std::unique_ptr<GCDepthConcatenateLayerKernel>> _concat_kernels_vector;
+    std::vector<std::unique_ptr<GCFillBorderKernel>>            _border_handlers_vector;
+    unsigned int                                                _num_inputs;
 };
 }
 #endif /* __ARM_COMPUTE_GCDEPTHCONCATENATE_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NECropResize.h b/arm_compute/runtime/NEON/functions/NECropResize.h
index e790e68..53e8f7f 100644
--- a/arm_compute/runtime/NEON/functions/NECropResize.h
+++ b/arm_compute/runtime/NEON/functions/NECropResize.h
@@ -98,10 +98,10 @@
     InterpolationPolicy _method;
     float               _extrapolation_value;
 
-    std::unique_ptr<NECropKernel[]> _crop;
-    std::unique_ptr<NEScale[]>      _scale;
-    std::unique_ptr<Tensor[]>       _crop_results{ nullptr };
-    std::unique_ptr<Tensor[]>       _scaled_results{ nullptr };
+    std::vector<std::unique_ptr<NECropKernel>> _crop;
+    std::vector<std::unique_ptr<NEScale>>      _scale;
+    std::vector<std::unique_ptr<Tensor>>       _crop_results;
+    std::vector<std::unique_ptr<Tensor>>       _scaled_results;
 };
 } // namespace arm_compute
 #endif /* __ARM_COMPUTE_NEON_CROP_RESIZE_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h b/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h
index e2f2c4c..b3bf752 100644
--- a/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEDepthConcatenateLayer.h
@@ -84,10 +84,10 @@
     void run() override;
 
 private:
-    std::vector<ITensor *>                           _inputs_vector;
-    std::unique_ptr<NEDepthConcatenateLayerKernel[]> _concat_kernels_vector;
-    std::unique_ptr<NEFillBorderKernel[]>            _border_handlers_vector;
-    unsigned int                                     _num_inputs;
+    std::vector<ITensor *>                                      _inputs_vector;
+    std::vector<std::unique_ptr<NEDepthConcatenateLayerKernel>> _concat_kernels_vector;
+    std::vector<std::unique_ptr<NEFillBorderKernel>>            _border_handlers_vector;
+    unsigned int                                                _num_inputs;
 };
 } // namespace arm_compute
 #endif /* __ARM_COMPUTE_NEDEPTHCONCATENATE_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h b/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h
index dbe0ecd..47fcd5e 100644
--- a/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h
+++ b/arm_compute/runtime/NEON/functions/NEGaussianPyramid.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -91,10 +91,10 @@
     void run() override;
 
 private:
-    std::unique_ptr<NEFillBorderKernel[]>          _horizontal_border_handler;
-    std::unique_ptr<NEFillBorderKernel[]>          _vertical_border_handler;
-    std::unique_ptr<NEGaussianPyramidHorKernel[]>  _horizontal_reduction;
-    std::unique_ptr<NEGaussianPyramidVertKernel[]> _vertical_reduction;
+    std::vector<std::unique_ptr<NEFillBorderKernel>>          _horizontal_border_handler;
+    std::vector<std::unique_ptr<NEFillBorderKernel>>          _vertical_border_handler;
+    std::vector<std::unique_ptr<NEGaussianPyramidHorKernel>>  _horizontal_reduction;
+    std::vector<std::unique_ptr<NEGaussianPyramidVertKernel>> _vertical_reduction;
 };
 
 /** Basic function to execute gaussian pyramid with ORB scale factor. This function calls the following NEON kernels and functions:
@@ -115,8 +115,8 @@
     void run() override;
 
 private:
-    std::unique_ptr<NEGaussian5x5[]> _gaus5x5;
-    std::unique_ptr<NEScale[]>       _scale_nearest;
+    std::vector<std::unique_ptr<NEGaussian5x5>> _gaus5x5;
+    std::vector<std::unique_ptr<NEScale>>       _scale_nearest;
 };
 }
 #endif /*__ARM_COMPUTE_NEGAUSSIANPYRAMID_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h b/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h
index 0d268ca..e21f463 100644
--- a/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h
+++ b/arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -91,12 +91,12 @@
 private:
     MemoryGroup                                                   _memory_group;
     NEHOGGradient                                                 _gradient_kernel;
-    std::unique_ptr<NEHOGOrientationBinningKernel[]>              _orient_bin_kernel;
-    std::unique_ptr<NEHOGBlockNormalizationKernel[]>              _block_norm_kernel;
-    std::unique_ptr<NEHOGDetector[]>                              _hog_detect_kernel;
+    std::vector<std::unique_ptr<NEHOGOrientationBinningKernel>>   _orient_bin_kernel;
+    std::vector<std::unique_ptr<NEHOGBlockNormalizationKernel>>   _block_norm_kernel;
+    std::vector<std::unique_ptr<NEHOGDetector>>                   _hog_detect_kernel;
     std::unique_ptr<CPPDetectionWindowNonMaximaSuppressionKernel> _non_maxima_kernel;
-    std::unique_ptr<Tensor[]>                                     _hog_space;
-    std::unique_ptr<Tensor[]>                                     _hog_norm_space;
+    std::vector<std::unique_ptr<Tensor>>                          _hog_space;
+    std::vector<std::unique_ptr<Tensor>>                          _hog_norm_space;
     IDetectionWindowArray                                        *_detection_windows;
     Tensor                                                        _mag;
     Tensor                                                        _phase;
diff --git a/arm_compute/runtime/NEON/functions/NEOpticalFlow.h b/arm_compute/runtime/NEON/functions/NEOpticalFlow.h
index ad703f0..320247d 100644
--- a/arm_compute/runtime/NEON/functions/NEOpticalFlow.h
+++ b/arm_compute/runtime/NEON/functions/NEOpticalFlow.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -86,17 +86,17 @@
     void run() override;
 
 private:
-    MemoryGroup                          _memory_group;
-    std::unique_ptr<NEScharr3x3[]>       _func_scharr;
-    std::unique_ptr<NELKTrackerKernel[]> _kernel_tracker;
-    std::unique_ptr<Tensor[]>            _scharr_gx;
-    std::unique_ptr<Tensor[]>            _scharr_gy;
-    IKeyPointArray                      *_new_points;
-    const IKeyPointArray                *_new_points_estimates;
-    const IKeyPointArray                *_old_points;
-    LKInternalKeypointArray              _new_points_internal;
-    LKInternalKeypointArray              _old_points_internal;
-    unsigned int                         _num_levels;
+    MemoryGroup                                     _memory_group;
+    std::vector<std::unique_ptr<NEScharr3x3>>       _func_scharr;
+    std::vector<std::unique_ptr<NELKTrackerKernel>> _kernel_tracker;
+    std::vector<std::unique_ptr<Tensor>>            _scharr_gx;
+    std::vector<std::unique_ptr<Tensor>>            _scharr_gy;
+    IKeyPointArray                                 *_new_points;
+    const IKeyPointArray                           *_new_points_estimates;
+    const IKeyPointArray                           *_old_points;
+    LKInternalKeypointArray                         _new_points_internal;
+    LKInternalKeypointArray                         _old_points_internal;
+    unsigned int                                    _num_levels;
 };
 }
 #endif /*__ARM_COMPUTE_NEOPTICALFLOW_H__ */