Fixed some VS warnings
Thanks to Fraggy again ! Former-commit-id: bd0eea66714701b065892d8b69d576e7b3615dd2
This commit is contained in:
@@ -398,7 +398,7 @@ bool NzShaderProgram::LoadShaderFromFile(nzShaderType type, const NzString& file
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int length = file.GetSize();
|
||||
unsigned int length = static_cast<unsigned int>(file.GetSize());
|
||||
|
||||
NzString source;
|
||||
source.Resize(length);
|
||||
|
||||
@@ -110,7 +110,7 @@ const NzShaderProgram* NzShaderProgramManager::Get(const NzShaderProgramManagerP
|
||||
{
|
||||
NazaraDebug("File found");
|
||||
|
||||
unsigned int size = shaderFile.GetSize();
|
||||
unsigned int size = static_cast<unsigned int>(shaderFile.GetSize());
|
||||
|
||||
NzByteArray binary;
|
||||
binary.Resize(size);
|
||||
|
||||
@@ -19,7 +19,7 @@ NzContextImpl::NzContextImpl()
|
||||
|
||||
bool NzContextImpl::Activate()
|
||||
{
|
||||
return wglMakeCurrent(m_deviceContext, m_context);
|
||||
return wglMakeCurrent(m_deviceContext, m_context) == TRUE;
|
||||
}
|
||||
|
||||
bool NzContextImpl::Create(NzContextParameters& parameters)
|
||||
@@ -74,7 +74,7 @@ bool NzContextImpl::Create(NzContextParameters& parameters)
|
||||
|
||||
do
|
||||
{
|
||||
valid = wglChoosePixelFormat(m_deviceContext, attributes, nullptr, 1, &pixelFormat, &numFormats);
|
||||
valid = (wglChoosePixelFormat(m_deviceContext, attributes, nullptr, 1, &pixelFormat, &numFormats) == TRUE);
|
||||
}
|
||||
while ((!valid || numFormats == 0) && --attributes[19] > 0);
|
||||
|
||||
@@ -229,6 +229,6 @@ void NzContextImpl::SwapBuffers()
|
||||
|
||||
bool NzContextImpl::Desactivate()
|
||||
{
|
||||
return wglMakeCurrent(nullptr, nullptr);
|
||||
return wglMakeCurrent(nullptr, nullptr) == TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user