Files
NazaraEngine/include/Nazara/Core/PoolByteStream.inl
SirLynix 5130a2ff84 Remove Config.hpp options and refactor headers
- Rename Config.hpp to Export.hpp
- Remove Debug.hpp and DebugOff.hpp (not used anymore)
2024-02-19 15:11:34 +01:00

28 lines
698 B
C++

// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Core/Error.hpp>
#include <cstring>
namespace Nz
{
inline PoolByteStream::PoolByteStream(ByteArrayPool& pool) :
m_pool(pool)
{
}
inline PoolByteStream::PoolByteStream(ByteArrayPool& pool, std::size_t capacity) :
PoolByteStream(pool)
{
Reset(capacity);
}
inline PoolByteStream::~PoolByteStream()
{
FlushBits(); //< Needs to be done here as the stream will be freed before ByteStream calls it
Reset(); //< Returns the byte array (if any) to the pool
}
}