Minor changes

Former-commit-id: fd74c48a546663f4d4802826ee2d396b0874e2c9
This commit is contained in:
Lynix 2015-01-03 21:45:37 +01:00
parent 57b90112fb
commit 2bfb798dd9
6 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,6 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/Error.hpp>
#include <iostream>
#include <Nazara/Core/MemoryHelper.hpp>
#include <Nazara/Lua/Debug.hpp>

View File

@ -733,7 +733,7 @@ bool NzFile::FillHash(NzAbstractHash* hash) const
unsigned int size;
while (remainingSize > 0)
{
size = (remainingSize >= NAZARA_CORE_FILE_BUFFERSIZE) ? NAZARA_CORE_FILE_BUFFERSIZE : static_cast<unsigned int>(remainingSize);
size = std::min(remainingSize, static_cast<nzUInt64>(NAZARA_CORE_FILE_BUFFERSIZE));
if (file.Read(&buffer[0], sizeof(char), size) != sizeof(char)*size)
{
NazaraError("Unable to read file");

View File

@ -557,7 +557,7 @@ bool NzLuaInstance::IsOfType(int index, nzLuaType type) const
return lua_isuserdata(m_state, index) == 1;
}
NazaraError("Lua type unhandled (0x" + NzString::Number(type, 16) + ')');
NazaraError("Lua type not handled (0x" + NzString::Number(type, 16) + ')');
return false;
}

View File

@ -38,7 +38,7 @@ namespace
switch (source)
{
case GL_DEBUG_SOURCE_API:
ss << "OpenGL";
ss << "OpenGL API";
break;
case GL_DEBUG_SOURCE_WINDOW_SYSTEM:

View File

@ -924,7 +924,7 @@ bool NzRenderer::IsComponentTypeSupported(nzComponentType type)
return false;
}
NazaraError("Attribute type out of enum (0x" + NzString::Number(type, 16) + ')');
NazaraError("Attribute type not handled (0x" + NzString::Number(type, 16) + ')');
return false;
}

View File

@ -254,10 +254,10 @@ NzString NzShader::GetSourceCode(nzShaderStage stage) const
unsigned int totalLength = 0;
for (unsigned int shader : m_attachedShaders[stage])
{
GLint length;
glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &length);
GLint length;
glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &length);
totalLength += length - 1;
totalLength += length - 1;
}
totalLength += (m_attachedShaders[stage].size()-1)*(sizeof(sep)/sizeof(char));