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>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2017-11-22 16:49:37 +11:00
|
|
|
#include "null.hpp"
|
2015-11-13 17:17:37 +11:00
|
|
|
|
2017-08-29 16:53:11 +10:00
|
|
|
#include "../../debug.hpp"
|
2015-11-13 17:17:37 +11:00
|
|
|
|
2016-10-11 23:47:57 +11:00
|
|
|
#include <new>
|
2015-11-13 17:17:37 +11:00
|
|
|
|
2017-08-29 16:53:11 +10:00
|
|
|
using util::alloc::raw::null;
|
2015-11-13 17:17:37 +11:00
|
|
|
|
|
|
|
|
2016-10-10 20:59:26 +11:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2018-02-28 17:55:56 +11:00
|
|
|
std::byte*
|
2017-08-31 13:48:33 +10:00
|
|
|
null::begin (void)
|
2016-10-10 20:59:26 +11:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2018-02-28 17:55:56 +11:00
|
|
|
const std::byte*
|
2017-08-31 13:48:33 +10:00
|
|
|
null::begin (void) const
|
2016-10-10 20:59:26 +11:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-02-28 17:55:56 +11:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
std::byte*
|
|
|
|
null::end (void)
|
|
|
|
{ return nullptr; }
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
const std::byte*
|
|
|
|
null::end (void) const
|
|
|
|
{ return nullptr; }
|
|
|
|
|
|
|
|
|
2016-10-10 20:59:26 +11:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
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;
|
|
|
|
}
|