forked from boostorg/container
Added BOOST_OVERRIDE according to -Wsuggest-override
This commit is contained in:
@@ -21,10 +21,10 @@ class derived_from_memory_resource
|
||||
: id(i)
|
||||
{}
|
||||
|
||||
virtual ~derived_from_memory_resource()
|
||||
virtual ~derived_from_memory_resource() BOOST_OVERRIDE
|
||||
{ destructor_called = true; }
|
||||
|
||||
virtual void* do_allocate(std::size_t bytes, std::size_t alignment)
|
||||
virtual void* do_allocate(std::size_t bytes, std::size_t alignment) BOOST_OVERRIDE
|
||||
{
|
||||
do_allocate_called = true;
|
||||
do_allocate_bytes = bytes;
|
||||
@@ -32,7 +32,7 @@ class derived_from_memory_resource
|
||||
return do_allocate_return;
|
||||
}
|
||||
|
||||
virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
|
||||
virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) BOOST_OVERRIDE
|
||||
{
|
||||
do_deallocate_called = true;
|
||||
do_deallocate_p = p;
|
||||
@@ -40,7 +40,7 @@ class derived_from_memory_resource
|
||||
do_deallocate_alignment = alignment;
|
||||
}
|
||||
|
||||
virtual bool do_is_equal(const boost::container::pmr::memory_resource& other) const BOOST_NOEXCEPT
|
||||
virtual bool do_is_equal(const boost::container::pmr::memory_resource& other) const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
{
|
||||
do_is_equal_called = true;
|
||||
do_is_equal_other = &other;
|
||||
|
||||
@@ -35,10 +35,10 @@ class memory_resource_logger
|
||||
, m_mismatches()
|
||||
{}
|
||||
|
||||
virtual ~memory_resource_logger()
|
||||
virtual ~memory_resource_logger() BOOST_OVERRIDE
|
||||
{ this->reset(); }
|
||||
|
||||
virtual void* do_allocate(std::size_t bytes, std::size_t alignment)
|
||||
virtual void* do_allocate(std::size_t bytes, std::size_t alignment) BOOST_OVERRIDE
|
||||
{
|
||||
char *addr =(char*)std::malloc(bytes);
|
||||
if(!addr){
|
||||
@@ -52,7 +52,7 @@ class memory_resource_logger
|
||||
return addr;
|
||||
}
|
||||
|
||||
virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment)
|
||||
virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) BOOST_OVERRIDE
|
||||
{
|
||||
std::size_t i = 0, max = m_info.size();
|
||||
while(i != max && m_info[i].address != p){
|
||||
@@ -69,7 +69,7 @@ class memory_resource_logger
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool do_is_equal(const boost::container::pmr::memory_resource& other) const BOOST_NOEXCEPT
|
||||
virtual bool do_is_equal(const boost::container::pmr::memory_resource& other) const BOOST_NOEXCEPT BOOST_OVERRIDE
|
||||
{
|
||||
return static_cast<const memory_resource *>(this) == &other;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user