Fix warnings reported by Clang
This commit is contained in:
parent
c8d046158c
commit
dc158d06a8
|
|
@ -68,7 +68,7 @@ namespace Nz
|
|||
* \param sceneData Data of the scene
|
||||
*/
|
||||
|
||||
void DepthRenderTechnique::Clear(const SceneData& sceneData) const
|
||||
void DepthRenderTechnique::Clear(const SceneData& /*sceneData*/) const
|
||||
{
|
||||
Renderer::Enable(RendererParameter_DepthBuffer, true);
|
||||
Renderer::Enable(RendererParameter_DepthWrite, true);
|
||||
|
|
|
|||
|
|
@ -990,7 +990,6 @@ namespace Nz
|
|||
if (uniforms.locations.shadowMapping != -1)
|
||||
shader->SendBoolean(uniforms.locations.shadowMapping + uniformOffset, light.shadowMap != nullptr);
|
||||
|
||||
unsigned int textureUnit = Material::GetTextureUnit(static_cast<TextureMap>(TextureMap_ShadowCube_1 + index));
|
||||
if (light.shadowMap)
|
||||
{
|
||||
unsigned int textureUnitCube = Material::GetTextureUnit(static_cast<TextureMap>(TextureMap_ShadowCube_1 + index));
|
||||
|
|
@ -1014,7 +1013,6 @@ namespace Nz
|
|||
if (uniforms.locations.shadowMapping != -1)
|
||||
shader->SendBoolean(uniforms.locations.shadowMapping + uniformOffset, light.shadowMap != nullptr);
|
||||
|
||||
unsigned int textureUnit = Material::GetTextureUnit(static_cast<TextureMap>(TextureMap_Shadow2D_1 + index));
|
||||
if (light.shadowMap)
|
||||
{
|
||||
unsigned int textureUnit2D = Material::GetTextureUnit(static_cast<TextureMap>(TextureMap_Shadow2D_1 + index));
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ namespace Nz
|
|||
|
||||
ParticleGroup::ParticleGroup(unsigned int maxParticleCount, ParticleDeclarationConstRef declaration) :
|
||||
m_declaration(std::move(declaration)),
|
||||
m_processing(false),
|
||||
m_maxParticleCount(maxParticleCount),
|
||||
m_particleCount(0)
|
||||
m_particleCount(0),
|
||||
m_processing(false)
|
||||
{
|
||||
// In case of error, the constructor can only throw an exception
|
||||
ErrorFlags flags(ErrorFlag_ThrowException, true);
|
||||
|
|
@ -64,10 +64,10 @@ namespace Nz
|
|||
m_generators(system.m_generators),
|
||||
m_declaration(system.m_declaration),
|
||||
m_renderer(system.m_renderer),
|
||||
m_processing(false),
|
||||
m_maxParticleCount(system.m_maxParticleCount),
|
||||
m_particleCount(system.m_particleCount),
|
||||
m_particleSize(system.m_particleSize)
|
||||
m_particleSize(system.m_particleSize),
|
||||
m_processing(false)
|
||||
{
|
||||
ErrorFlags flags(ErrorFlag_ThrowException, true);
|
||||
|
||||
|
|
|
|||
|
|
@ -835,7 +835,6 @@ namespace Nz
|
|||
if (!PixelFormat::IsCompressed(m_sharedImage->format))
|
||||
{
|
||||
const PixelFormatInfo& info = PixelFormat::GetInfo(m_sharedImage->format);
|
||||
const UInt8* pixel = GetConstPixels();
|
||||
|
||||
Bitset<> workingBitset;
|
||||
std::size_t pixelCount = m_sharedImage->width * m_sharedImage->height * ((m_sharedImage->type == ImageType_Cubemap) ? 6 : m_sharedImage->depth);
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ namespace Nz
|
|||
IndexBuffer::IndexBuffer(const IndexBuffer& indexBuffer) :
|
||||
RefCounted(),
|
||||
m_buffer(indexBuffer.m_buffer),
|
||||
m_largeIndices(indexBuffer.m_largeIndices),
|
||||
m_endOffset(indexBuffer.m_endOffset),
|
||||
m_indexCount(indexBuffer.m_indexCount),
|
||||
m_startOffset(indexBuffer.m_startOffset)
|
||||
m_startOffset(indexBuffer.m_startOffset),
|
||||
m_largeIndices(indexBuffer.m_largeIndices)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -365,12 +365,14 @@ namespace Nz
|
|||
{
|
||||
case '\n':
|
||||
{
|
||||
// Extend the line bounding rect to the last glyph it contains, thus extending upon all glyphs of the line
|
||||
if (!m_glyphs.empty())
|
||||
{
|
||||
Glyph& glyph = m_glyphs.back();
|
||||
Glyph& lastGlyph = m_glyphs.back();
|
||||
m_lines.back().bounds.ExtendTo(glyph.bounds);
|
||||
}
|
||||
|
||||
// Reset cursor
|
||||
advance = 0;
|
||||
m_drawPos.x = 0;
|
||||
m_drawPos.y += sizeInfo.lineHeight;
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ namespace Nz
|
|||
VertexBuffer::VertexBuffer(const VertexBuffer& vertexBuffer) :
|
||||
RefCounted(),
|
||||
m_buffer(vertexBuffer.m_buffer),
|
||||
m_vertexDeclaration(vertexBuffer.m_vertexDeclaration),
|
||||
m_endOffset(vertexBuffer.m_endOffset),
|
||||
m_startOffset(vertexBuffer.m_startOffset),
|
||||
m_vertexCount(vertexBuffer.m_vertexCount)
|
||||
m_vertexCount(vertexBuffer.m_vertexCount),
|
||||
m_vertexDeclaration(vertexBuffer.m_vertexDeclaration)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ namespace Nz
|
|||
xcb_cursor_t CursorImpl::s_hiddenCursor = 0;
|
||||
|
||||
std::array<const char*, SystemCursor_Max + 1> CursorImpl::s_systemCursorIds =
|
||||
{
|
||||
{
|
||||
// http://gnome-look.org/content/preview.php?preview=1&id=128170&file1=128170-1.png&file2=&file3=&name=Dummy+X11+cursors&PHPSESSID=6
|
||||
"crosshair", // SystemCursor_Crosshair
|
||||
|
|
@ -251,6 +252,7 @@ namespace Nz
|
|||
"left_side", // SystemCursor_ResizeW
|
||||
"xterm", // SystemCursor_Text
|
||||
"watch" // SystemCursor_Wait
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(SystemCursor_Max + 1 == 18, "System cursor array is incomplete");
|
||||
|
|
|
|||
|
|
@ -229,14 +229,14 @@ namespace Nz
|
|||
return screen_nbr;
|
||||
}
|
||||
|
||||
xcb_screen_t* X11::XCBScreenOfDisplay(xcb_connection_t* connection, int screen_nbr)
|
||||
xcb_screen_t* X11::XCBScreenOfDisplay(xcb_connection_t* connection, int screenIndex)
|
||||
{
|
||||
NazaraAssert(connection == sharedConnection, "The model is meant for one connection to X11 server");
|
||||
xcb_screen_iterator_t iter = xcb_setup_roots_iterator(xcb_get_setup(connection));
|
||||
|
||||
for (; iter.rem; --screen_nbr, xcb_screen_next (&iter))
|
||||
for (; iter.rem; --screenIndex, xcb_screen_next (&iter))
|
||||
{
|
||||
if (screen_nbr == 0)
|
||||
if (screenIndex == 0)
|
||||
return iter.data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ namespace Nz
|
|||
m_style(0),
|
||||
m_parent(parent),
|
||||
m_smoothScrolling(false),
|
||||
m_scrolling(0),
|
||||
m_mousePos(0, 0),
|
||||
m_keyRepeat(true)
|
||||
{
|
||||
|
|
@ -1134,7 +1133,6 @@ namespace Nz
|
|||
|
||||
// if (std::isprint(codePoint)) Is not working ? + handle combining ?
|
||||
{
|
||||
WindowEvent event;
|
||||
event.type = Nz::WindowEventType_TextEntered;
|
||||
event.text.character = codePoint;
|
||||
event.text.repeated = false;
|
||||
|
|
@ -1396,7 +1394,7 @@ namespace Nz
|
|||
hints.functions |= MWM_FUNC_CLOSE;
|
||||
}
|
||||
|
||||
ScopedXCB<xcb_generic_error_t> error(xcb_request_check(
|
||||
ScopedXCB<xcb_generic_error_t> propertyError(xcb_request_check(
|
||||
connection,
|
||||
xcb_change_property_checked(
|
||||
connection,
|
||||
|
|
@ -1410,7 +1408,7 @@ namespace Nz
|
|||
)
|
||||
));
|
||||
|
||||
if (error)
|
||||
if (propertyError)
|
||||
NazaraError("xcb_change_property failed, could not set window hints");
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ namespace Nz
|
|||
bool m_ownsWindow;
|
||||
bool m_smoothScrolling;
|
||||
bool m_threadActive;
|
||||
short m_scrolling;
|
||||
Vector2i m_mousePos;
|
||||
bool m_keyRepeat;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue