UnitTests: Fix errors

Former-commit-id: fb2340e5c7c264193f1ac363d6387486215aef7e
This commit is contained in:
Lynix
2016-05-05 21:27:36 +02:00
parent 5e52988d87
commit 385c597434
13 changed files with 96 additions and 37 deletions

View File

@@ -0,0 +1,35 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/SerializationContext.hpp>
#include <Nazara/Core/Algorithm.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
/*!
* \ingroup core
* \class Nz::SerializationContext
* \brief Structure containing a serialization/unserialization context states
*/
/*!
* Write bits to the stream (if any) and reset the current bit cursor
* \see ResetBitPosition
*/
void SerializationContext::FlushBits()
{
if (currentBitPos != 8)
{
ResetBitPosition();
// Serialize will reset the bit position
if (!Serialize<UInt8>(*this, currentByte))
NazaraWarning("Failed to flush bits");
}
}
}