libcruft-util/cruft/util/alloc/null.cpp

81 lines
1.5 KiB
C++
Raw Normal View History

2015-11-13 17:17:37 +11:00
/*
2018-08-04 15:14:06 +10:00
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
2015-11-13 17:17:37 +11:00
*
* Copyright 2015 Danny Robson <danny@nerdcruft.net>
*/
#include "null.hpp"
2015-11-13 17:17:37 +11:00
using cruft::alloc::null;
2015-11-13 17:17:37 +11:00
///////////////////////////////////////////////////////////////////////////////
std::byte*
2017-08-31 13:48:33 +10:00
null::begin (void)
{
return nullptr;
}
//-----------------------------------------------------------------------------
const std::byte*
2017-08-31 13:48:33 +10:00
null::begin (void) const
{
return nullptr;
}
//-----------------------------------------------------------------------------
std::byte*
null::end (void)
{ return nullptr; }
//-----------------------------------------------------------------------------
const std::byte*
null::end (void) const
{ return nullptr; }
//-----------------------------------------------------------------------------
size_t
null::offset (const void *ptr) const
{
return reinterpret_cast<uintptr_t> (ptr);
}
///////////////////////////////////////////////////////////////////////////////
void
null::reset (void)
{
;
}
///////////////////////////////////////////////////////////////////////////////
size_t
null::capacity (void) const
{
return 0;
}
//-----------------------------------------------------------------------------
size_t
null::used (void) const
{
return 0;
}
//-----------------------------------------------------------------------------
size_t
null::remain (void) const
{
return 0;
}