Lot of small fixes/improvements
This commit is contained in:
@@ -39,8 +39,6 @@ namespace Nz
|
||||
static std::size_t GetSize(StructFieldType fieldType);
|
||||
|
||||
private:
|
||||
static inline std::size_t Align(std::size_t source, std::size_t alignment);
|
||||
|
||||
std::size_t m_largestFieldAlignment;
|
||||
std::size_t m_offsetRounding;
|
||||
std::size_t m_size;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/FieldOffsets.hpp>
|
||||
#include <Nazara/Core/Algorithm.hpp>
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <Nazara/Utility/Debug.hpp>
|
||||
@@ -163,15 +164,6 @@ namespace Nz
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline std::size_t FieldOffsets::Align(std::size_t source, std::size_t alignment)
|
||||
{
|
||||
if (source == 0)
|
||||
return source;
|
||||
|
||||
assert(alignment > 0);
|
||||
return ((source + alignment - 1) / alignment) * alignment;
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Utility/DebugOff.hpp>
|
||||
|
||||
Reference in New Issue
Block a user