From 2da3b22b477d8b94b60fb9eb5f1a4daacb6857b5 Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Sun, 20 Aug 2017 00:43:02 +0200 Subject: [PATCH] Coverty fix --- configure.ac | 2 +- src/memory/BHeapMemory.hpp | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 315731d..38080b9 100755 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.59) -AC_INIT(OpenFPM_devices, 0.8.0, BUG-REPORT-ADDRESS) +AC_INIT(OpenFPM_devices, 1.0.0, BUG-REPORT-ADDRESS) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([src/main.cpp]) diff --git a/src/memory/BHeapMemory.hpp b/src/memory/BHeapMemory.hpp index eded629..23220b4 100644 --- a/src/memory/BHeapMemory.hpp +++ b/src/memory/BHeapMemory.hpp @@ -46,16 +46,26 @@ typedef unsigned char byte; */ class BHeapMemory : public HeapMemory { + //! size of the memory size_t buf_sz; public: - // Copy the Heap memory + /*! \brief Copy the Heap memory + * + * \param mem memory to copy + * + */ BHeapMemory(const BHeapMemory & mem) :HeapMemory(mem),buf_sz(mem.size()) { } + /*! \brief Copy the Heap memory + * + * \param mem memory to copy + * + */ BHeapMemory(BHeapMemory && mem) noexcept :HeapMemory((HeapMemory &&)mem),buf_sz(mem.size()) { @@ -66,6 +76,7 @@ public: :HeapMemory(),buf_sz(0) {}; + //! Destructor virtual ~BHeapMemory() noexcept { }; @@ -111,10 +122,7 @@ public: /*! \brief Resize the buffer size * - * Resize the buffer size, - * - * \param sz size - * \return true if the resize operation complete correctly + * \return the buffer size * */ virtual size_t size() const @@ -135,6 +143,9 @@ public: /*! \brief Copy the memory * + * \param mem memory to copy + * + * \return itself * */ BHeapMemory & operator=(const BHeapMemory & mem) @@ -147,6 +158,9 @@ public: /*! \brief Copy the memory * + * \param mem memory to copy + * + * \return itself * */ BHeapMemory & operator=(BHeapMemory && mem) -- GitLab