Fix a lot of warnings from Clang/GCC

This commit is contained in:
Lynix
2016-10-17 14:46:53 +02:00
parent 56498af1a8
commit 5a07bbd001
17 changed files with 18 additions and 33 deletions

View File

@@ -123,9 +123,8 @@ namespace Nz
* \see CountOf
*/
template<typename T, std::size_t N>
constexpr std::size_t CountOf(T(&name)[N]) noexcept
constexpr std::size_t CountOf(T(&)[N]) noexcept
{
// NazaraUnused(name); //< Because "body of function is not a return-statement" >.>
return N;
}

View File

@@ -71,6 +71,8 @@ namespace Nz
template<typename T>
HandledObject<T>& HandledObject<T>::operator=(const HandledObject& object)
{
NazaraUnused(object);
// Nothing to do
return *this;
}

View File

@@ -56,7 +56,7 @@ namespace Nz
*/
inline IpAddress::IpAddress(const UInt8& a, const UInt8& b, const UInt8& c, const UInt8& d, UInt16 port) :
IpAddress(IPv4{a, b, c, d}, port)
IpAddress(IPv4{{a, b, c, d}}, port)
{
}
@@ -68,7 +68,7 @@ namespace Nz
*/
inline IpAddress::IpAddress(const UInt16& a, const UInt16& b, const UInt16& c, const UInt16& d, const UInt16& e, const UInt16& f, const UInt16& g, const UInt16& h, UInt16 port) :
IpAddress(IPv6{a, b, c, d, e, f, g, h}, port)
IpAddress(IPv6{{a, b, c, d, e, f, g, h}}, port)
{
}

View File

@@ -79,8 +79,8 @@ namespace Nz
PendingPacket m_pendingPacket;
UInt64 m_keepAliveInterval;
UInt64 m_keepAliveTime;
bool m_isLowDelayEnabled;
bool m_isKeepAliveEnabled;
bool m_isLowDelayEnabled;
};
}

View File

@@ -111,8 +111,8 @@ namespace Nz
if (content <= PixelFormatContent_Undefined || content > PixelFormatContent_Max)
return false;
std::array<const Nz::Bitset<>*, 4> masks = {&redMask, &greenMask, &blueMask, &alphaMask};
std::array<PixelFormatSubType, 4> types = {redType, greenType, blueType, alphaType};
std::array<const Nz::Bitset<>*, 4> masks = { {&redMask, &greenMask, &blueMask, &alphaMask} };
std::array<PixelFormatSubType, 4> types = { {redType, greenType, blueType, alphaType} };
for (unsigned int i = 0; i < 4; ++i)
{