Merge pull request #33 from Gawaboumga/master
Suppression of warnings Former-commit-id: e7a649bc108bd50e57e6fd56639be15821fc8fa7
This commit is contained in:
commit
0c7117bc0f
|
|
@ -16,7 +16,7 @@ template <typename T, typename M> M NzImplGetMemberType(M T::*);
|
||||||
template <typename T, typename R, R T::*M>
|
template <typename T, typename R, R T::*M>
|
||||||
constexpr std::size_t NzImplOffsetOf()
|
constexpr std::size_t NzImplOffsetOf()
|
||||||
{
|
{
|
||||||
return reinterpret_cast<std::size_t>(&(((T*)0)->*M));
|
return reinterpret_cast<std::size_t>(&((static_cast<T*>(0))->*M));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NzOffsetOf(type, member) NzImplOffsetOf<decltype(NzImplGetClassType(&type::member)), decltype(NzImplGetMemberType(&type::member)), &type::member>()
|
#define NzOffsetOf(type, member) NzImplOffsetOf<decltype(NzImplGetClassType(&type::member)), decltype(NzImplGetMemberType(&type::member)), &type::member>()
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,12 @@
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
|
|
||||||
class NzUpdatable
|
class NAZARA_API NzUpdatable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
NzUpdatable() = default;
|
||||||
|
virtual ~NzUpdatable();
|
||||||
|
|
||||||
virtual void Update() = 0;
|
virtual void Update() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class NAZARA_API NzDrawable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NzDrawable() = default;
|
NzDrawable() = default;
|
||||||
~NzDrawable();
|
virtual ~NzDrawable();
|
||||||
|
|
||||||
virtual void Draw() const = 0;
|
virtual void Draw() const = 0;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -51,19 +51,7 @@ NzVector2<T>::NzVector2(const NzVector4<T>& vec)
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T NzVector2<T>::AbsDotProduct(const NzVector2& vec) const
|
T NzVector2<T>::AbsDotProduct(const NzVector2& vec) const
|
||||||
{
|
{
|
||||||
return std::fabs(x * vec.x) + std::fabs(y * vec.y);
|
return std::abs(x * vec.x) + std::abs(y * vec.y);
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline int NzVector2<int>::AbsDotProduct(const NzVector2<int>& vec) const
|
|
||||||
{
|
|
||||||
return std::labs(x * vec.x) + std::labs(y * vec.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline unsigned int NzVector2<unsigned int>::AbsDotProduct(const NzVector2<unsigned int>& vec) const
|
|
||||||
{
|
|
||||||
return std::labs(x * vec.x) + std::labs(y * vec.y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -57,19 +57,7 @@ NzVector3<T>::NzVector3(const NzVector4<T>& vec)
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T NzVector3<T>::AbsDotProduct(const NzVector3& vec) const
|
T NzVector3<T>::AbsDotProduct(const NzVector3& vec) const
|
||||||
{
|
{
|
||||||
return std::fabs(x * vec.x) + std::fabs(y * vec.y) + std::fabs(z * vec.z);
|
return std::abs(x * vec.x) + std::abs(y * vec.y) + std::abs(z * vec.z);
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline int NzVector3<int>::AbsDotProduct(const NzVector3<int>& vec) const
|
|
||||||
{
|
|
||||||
return std::labs(x * vec.x) + std::labs(y * vec.y) + std::labs(z * vec.z);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline unsigned int NzVector3<unsigned int>::AbsDotProduct(const NzVector3<unsigned int>& vec) const
|
|
||||||
{
|
|
||||||
return std::labs(x * vec.x) + std::labs(y * vec.y) + std::labs(z * vec.z);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -70,19 +70,7 @@ NzVector4<T>::NzVector4(const NzVector4<U>& vec)
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T NzVector4<T>::AbsDotProduct(const NzVector4& vec) const
|
T NzVector4<T>::AbsDotProduct(const NzVector4& vec) const
|
||||||
{
|
{
|
||||||
return std::fabs(x * vec.x) + std::fabs(y * vec.y) + std::fabs(z * vec.z) + std::fabs(w * vec.w);
|
return std::abs(x * vec.x) + std::abs(y * vec.y) + std::abs(z * vec.z) + std::abs(w * vec.w);
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline int NzVector4<int>::AbsDotProduct(const NzVector4<int>& vec) const
|
|
||||||
{
|
|
||||||
return std::labs(x * vec.x) + std::labs(y * vec.y) + std::labs(z * vec.z) + std::labs(w * vec.w);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline unsigned int NzVector4<unsigned int>::AbsDotProduct(const NzVector4<unsigned int>& vec) const
|
|
||||||
{
|
|
||||||
return std::labs(x * vec.x) + std::labs(y * vec.y) + std::labs(z * vec.z) + std::labs(w * vec.w);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class NAZARA_API NzAbstractAtlas
|
||||||
|
|
||||||
void RemoveListener(Listener* font) const;
|
void RemoveListener(Listener* font) const;
|
||||||
|
|
||||||
class Listener
|
class NAZARA_API Listener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Listener() = default;
|
Listener() = default;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
// 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/Updatable.hpp>
|
||||||
|
#include <Nazara/Core/Debug.hpp>
|
||||||
|
|
||||||
|
NzUpdatable::~NzUpdatable() = default;
|
||||||
|
|
@ -297,4 +297,4 @@ void NzBuffer::Uninitialize()
|
||||||
std::memset(s_bufferFactories, 0, (nzDataStorage_Max+1)*sizeof(NzBuffer::BufferFactory));
|
std::memset(s_bufferFactories, 0, (nzDataStorage_Max+1)*sizeof(NzBuffer::BufferFactory));
|
||||||
}
|
}
|
||||||
|
|
||||||
NzBuffer::BufferFactory NzBuffer::s_bufferFactories[nzDataStorage_Max+1] = {0};
|
NzBuffer::BufferFactory NzBuffer::s_bufferFactories[nzDataStorage_Max+1] = {nullptr};
|
||||||
|
|
|
||||||
|
|
@ -809,7 +809,7 @@ NzVector3ui NzImage::GetSize(nzUInt8 level) const
|
||||||
if (level >= m_sharedImage->levelCount)
|
if (level >= m_sharedImage->levelCount)
|
||||||
{
|
{
|
||||||
NazaraError("Level out of bounds (" + NzString::Number(level) + " >= " + NzString::Number(m_sharedImage->levelCount) + ')');
|
NazaraError("Level out of bounds (" + NzString::Number(level) + " >= " + NzString::Number(m_sharedImage->levelCount) + ')');
|
||||||
return 0;
|
return NzVector3ui::Zero();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue