From 05f7c52378b9efc242108eade24e38c2143d4277 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 5 Oct 2016 00:38:52 +0200 Subject: [PATCH] Fix some warnings pointed by Clang Former-commit-id: 2e2e0a23d3b4115b584743f100ca05fa404a4e9a [formerly 02f505dd5b7c70682e035ddabaa7731fe09d8452] [formerly bccc66f75a5ad50f88043a502c3cae1395889740 [formerly 294134ecf2220589b85d6950054591ce02e596ec]] Former-commit-id: 9d8d7699eaf4128b3519b3d33b6f5a20bf16f30f [formerly d84e10bdcb4faf5cd48d639bab06544b6fc7bda1] Former-commit-id: d73659592f82b0416b2ca6f2b406f744e68c4d45 --- SDK/include/NDK/Console.hpp | 2 +- SDK/src/NDK/Console.cpp | 5 ++++- SDK/src/NDK/LuaBinding_SDK.cpp | 3 +++ include/Nazara/Noise/Simplex.hpp | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/SDK/include/NDK/Console.hpp b/SDK/include/NDK/Console.hpp index 78caac3f2..1c007065f 100644 --- a/SDK/include/NDK/Console.hpp +++ b/SDK/include/NDK/Console.hpp @@ -51,7 +51,7 @@ namespace Ndk inline bool IsVisible() const; void SendCharacter(char32_t character); - void SendEvent(Nz::WindowEvent event); + void SendEvent(const Nz::WindowEvent& event); void SetCharacterSize(unsigned int size); void SetSize(const Nz::Vector2f& size); diff --git a/SDK/src/NDK/Console.cpp b/SDK/src/NDK/Console.cpp index 94a80b749..122e2a125 100644 --- a/SDK/src/NDK/Console.cpp +++ b/SDK/src/NDK/Console.cpp @@ -168,7 +168,7 @@ namespace Ndk * \param event Event to be takin into consideration by the console */ - void Console::SendEvent(Nz::WindowEvent event) + void Console::SendEvent(const Nz::WindowEvent& event) { switch (event.type) { @@ -204,6 +204,9 @@ namespace Ndk } break; } + + default: + break; } } diff --git a/SDK/src/NDK/LuaBinding_SDK.cpp b/SDK/src/NDK/LuaBinding_SDK.cpp index 1ccd16342..af5cca5a8 100644 --- a/SDK/src/NDK/LuaBinding_SDK.cpp +++ b/SDK/src/NDK/LuaBinding_SDK.cpp @@ -233,6 +233,9 @@ namespace Ndk return &m_componentBinding[it->second]; } + + default: + break; } instance.Error("Invalid component index at #" + Nz::String::Number(argIndex)); diff --git a/include/Nazara/Noise/Simplex.hpp b/include/Nazara/Noise/Simplex.hpp index ae018f7bf..4f33c24ff 100644 --- a/include/Nazara/Noise/Simplex.hpp +++ b/include/Nazara/Noise/Simplex.hpp @@ -2,8 +2,8 @@ // This file is part of the "Nazara Engine - Noise module" // For conditions of distribution and use, see copyright notice in Config.hpp -#ifndef SIMPLEX_HPP -#define SIMPLE_HPP +#ifndef NAZARA_SIMPLEX_HPP +#define NAZARA_SIMPLEX_HPP #include #include @@ -25,4 +25,4 @@ namespace Nz }; } -#endif // SIMPLEX_HPP +#endif // NAZARA_SIMPLEX_HPP