Cleaned interface

And fixed some VS warnings


Former-commit-id: 8c89fa1d4dc92a362053e4cdeabe20537fcec2a6
This commit is contained in:
Lynix 2013-06-09 11:25:17 +02:00
parent 8460a96744
commit c76c419867
6 changed files with 18 additions and 22 deletions

View File

@ -27,6 +27,19 @@ enum nzErrorType
nzErrorType_Max = nzErrorType_Warning
};
enum nzHash
{
nzHash_CRC32,
nzHash_Fletcher16,
nzHash_MD5,
nzHash_SHA1,
nzHash_SHA224,
nzHash_SHA256,
nzHash_SHA384,
nzHash_SHA512,
nzHash_Whirlpool
};
enum nzPlugin
{
nzPlugin_Assimp,

View File

@ -8,19 +8,7 @@
#define HASHABLE_HPP_INCLUDED
#include <Nazara/Prerequesites.hpp>
enum nzHash
{
nzHash_CRC32,
nzHash_Fletcher16,
nzHash_MD5,
nzHash_SHA1,
nzHash_SHA224,
nzHash_SHA256,
nzHash_SHA384,
nzHash_SHA512,
nzHash_Whirlpool
};
#include <Nazara/Core/Enums.hpp>
class NzAbstractHash;
class NzHashDigest;

View File

@ -145,8 +145,8 @@
#endif
// Macros supplémentaires
#define NazaraStringifyMacro(s) NazaraStringify(s) // http://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification
#define NazaraStringify(s) #s
#define NazaraStringifyMacro(s) NazaraStringify(s) // http://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification
#define NazaraUnused(a) (void) a
#include <cstdint>

View File

@ -60,11 +60,6 @@ namespace
{"Vortex86 SoC", nzProcessorVendor_VIA}
};
bool VendorStringCompare(const VendorString& a, const VendorString& b)
{
return std::memcmp(a.vendor, b.vendor, 12);
}
nzProcessorVendor s_vendorEnum = nzProcessorVendor_Unknown;
bool s_capabilities[nzProcessorCap_Max+1] = {false};
bool s_initialized = false;

View File

@ -35,7 +35,7 @@ nzUInt64 NzMemoryStream::GetSize() const
std::size_t NzMemoryStream::Read(void* buffer, std::size_t size)
{
unsigned int readSize = std::min(static_cast<nzUInt64>(size), m_size-m_pos);
unsigned int readSize = std::min(static_cast<unsigned int>(size), static_cast<unsigned int>(m_size-m_pos));
std::memcpy(buffer, &m_ptr[m_pos], readSize);
m_pos += readSize;

View File

@ -14,7 +14,7 @@ NzVideoMode NzVideoModeImpl::GetDesktopMode()
mode.dmSize = sizeof(DEVMODE);
EnumDisplaySettings(nullptr, ENUM_CURRENT_SETTINGS, &mode);
return NzVideoMode(mode.dmPelsWidth, mode.dmPelsHeight, mode.dmBitsPerPel);
return NzVideoMode(mode.dmPelsWidth, mode.dmPelsHeight, static_cast<nzUInt8>(mode.dmBitsPerPel));
}
void NzVideoModeImpl::GetFullscreenModes(std::vector<NzVideoMode>& modes)
@ -23,7 +23,7 @@ void NzVideoModeImpl::GetFullscreenModes(std::vector<NzVideoMode>& modes)
win32Mode.dmSize = sizeof(DEVMODE);
for (unsigned int i = 0; EnumDisplaySettings(nullptr, i, &win32Mode); ++i)
{
NzVideoMode mode(win32Mode.dmPelsWidth, win32Mode.dmPelsHeight, win32Mode.dmBitsPerPel);
NzVideoMode mode(win32Mode.dmPelsWidth, win32Mode.dmPelsHeight, static_cast<nzUInt8>(win32Mode.dmBitsPerPel));
// Il existe plusieurs modes avec ces trois caractéristques identiques
if (std::find(modes.begin(), modes.end(), mode) == modes.end())