Suppression of warnings
OffsetOf: use of static_cast Updatable: API and virtual destructor Drawable: virtual destructor Vector: std::abs should be "the" abs. AbstractClass: API +Updatable: Like for others abstracts Buffer: nullptr for pointer to function. Image: wasn't returning a vector. Former-commit-id: 57e0009286a02b9e3b0b81945e500d7d9e466ae2
This commit is contained in:
@@ -16,7 +16,7 @@ template <typename T, typename M> M NzImplGetMemberType(M T::*);
|
||||
template <typename T, typename R, R T::*M>
|
||||
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>()
|
||||
|
||||
@@ -9,9 +9,12 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
|
||||
class NzUpdatable
|
||||
class NAZARA_API NzUpdatable
|
||||
{
|
||||
public:
|
||||
NzUpdatable() = default;
|
||||
virtual ~NzUpdatable();
|
||||
|
||||
virtual void Update() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class NAZARA_API NzDrawable
|
||||
{
|
||||
public:
|
||||
NzDrawable() = default;
|
||||
~NzDrawable();
|
||||
virtual ~NzDrawable();
|
||||
|
||||
virtual void Draw() const = 0;
|
||||
};
|
||||
|
||||
@@ -51,19 +51,7 @@ NzVector2<T>::NzVector2(const NzVector4<T>& vec)
|
||||
template<typename T>
|
||||
T NzVector2<T>::AbsDotProduct(const NzVector2& vec) const
|
||||
{
|
||||
return std::fabs(x * vec.x) + std::fabs(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);
|
||||
return std::abs(x * vec.x) + std::abs(y * vec.y);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -57,19 +57,7 @@ NzVector3<T>::NzVector3(const NzVector4<T>& vec)
|
||||
template<typename T>
|
||||
T NzVector3<T>::AbsDotProduct(const NzVector3& vec) const
|
||||
{
|
||||
return std::fabs(x * vec.x) + std::fabs(y * vec.y) + std::fabs(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);
|
||||
return std::abs(x * vec.x) + std::abs(y * vec.y) + std::abs(z * vec.z);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -70,19 +70,7 @@ NzVector4<T>::NzVector4(const NzVector4<U>& vec)
|
||||
template<typename T>
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
return std::abs(x * vec.x) + std::abs(y * vec.y) + std::abs(z * vec.z) + std::abs(w * vec.w);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -35,7 +35,7 @@ class NAZARA_API NzAbstractAtlas
|
||||
|
||||
void RemoveListener(Listener* font) const;
|
||||
|
||||
class Listener
|
||||
class NAZARA_API Listener
|
||||
{
|
||||
public:
|
||||
Listener() = default;
|
||||
|
||||
Reference in New Issue
Block a user