]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2088] Mark virtual methods as virtual even in derived classes
authorMukund Sivaraman <muks@isc.org>
Thu, 12 Jul 2012 04:36:39 +0000 (10:06 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 12 Jul 2012 04:36:39 +0000 (10:06 +0530)
src/lib/util/memory_segment_local.h

index 37af0687b8a5af959b3555d20b1f383e47e9f369..6764e5b7e5fe53c18582599be5ed5a2a5293928c 100644 (file)
@@ -41,7 +41,7 @@ public:
     ///
     /// \param size The size of the memory requested in bytes.
     /// \return Returns pointer to the memory allocated.
-    void* allocate(size_t size);
+    virtual void* allocate(size_t size);
 
     /// \brief Free/release a segment of memory.
     ///
@@ -49,13 +49,13 @@ public:
     /// should be equal to a value returned by <code>allocate()</code>.
     /// \param size The size of the memory to be freed in bytes. This
     /// should be equal to the number of bytes originally allocated.
-    void deallocate(void* ptr, size_t size);
+    virtual void deallocate(void* ptr, size_t size);
 
     /// \brief Check if all allocated memory was deallocated.
     ///
     /// \return Returns <code>true</code> if all allocated memory was
     /// deallocated, <code>false</code> otherwise.
-    bool allMemoryDeallocated() const;
+    virtual bool allMemoryDeallocated() const;
 
 private:
     // allocated_size_ can underflow, wrap around to max size_t (which