| @@ -2,7 +2,7 @@ | |||||
| // Lol Engine — Lua tutorial | // Lol Engine — Lua tutorial | ||||
| // | // | ||||
| // Copyright © 2014—2017 Benjamin “Touky” Huet <huet.benjamin@gmail.com> | // Copyright © 2014—2017 Benjamin “Touky” Huet <huet.benjamin@gmail.com> | ||||
| // © 2017—2018 Sam Hocevar <sam@hocevar.net> | |||||
| // © 2017—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | // | ||||
| // Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
| // the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
| @@ -29,10 +29,8 @@ class DemoObject : public LuaObject | |||||
| public: | public: | ||||
| DemoObject() : LuaObject() {} | DemoObject() : LuaObject() {} | ||||
| virtual ~DemoObject() {} | virtual ~DemoObject() {} | ||||
| static DemoObject* New(lua_State* l, int arg_nb) | |||||
| static DemoObject* New(lua_State *, int) | |||||
| { | { | ||||
| UNUSED(l); | |||||
| UNUSED(arg_nb); | |||||
| return new DemoObject(); | return new DemoObject(); | ||||
| } | } | ||||
| @@ -61,9 +59,8 @@ public: | |||||
| return (stack << f).End(); | return (stack << f).End(); | ||||
| } | } | ||||
| float AddTenMethod(float f, int32_t i, int32_t i2) | |||||
| float AddTenMethod(float f, int32_t, int32_t) | |||||
| { | { | ||||
| UNUSED(i, i2); | |||||
| return (f + 10); | return (f + 10); | ||||
| } | } | ||||
| @@ -1,7 +1,7 @@ | |||||
| // | // | ||||
| // Lol Engine | // Lol Engine | ||||
| // | // | ||||
| // Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net> | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | // | ||||
| // Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
| // the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
| @@ -391,14 +391,12 @@ void lol_android_main(void) | |||||
| { | { | ||||
| } | } | ||||
| void lol_android_main(int argc, char **argv) | |||||
| void lol_android_main(int, char **) | |||||
| { | { | ||||
| UNUSED(argc, argv); | |||||
| } | } | ||||
| void lol_android_main(int argc, char **argv, char **envp) | |||||
| void lol_android_main(int, char **, char **) | |||||
| { | { | ||||
| UNUSED(argc, argv, envp); | |||||
| } | } | ||||
| #endif /* __ANDROID__ */ | #endif /* __ANDROID__ */ | ||||
| @@ -86,10 +86,8 @@ EasyMeshLuaObject::~EasyMeshLuaObject() | |||||
| } | } | ||||
| //----------------------------------------------------------------------------- | //----------------------------------------------------------------------------- | ||||
| EasyMeshLuaObject* EasyMeshLuaObject::New(lua_State* l, int arg_nb) | |||||
| EasyMeshLuaObject* EasyMeshLuaObject::New(lua_State *, int) | |||||
| { | { | ||||
| UNUSED(l); | |||||
| UNUSED(arg_nb); | |||||
| LuaStack s = LuaStack::Begin(l); | LuaStack s = LuaStack::Begin(l); | ||||
| std::string str = s.Get<std::string>(""); | std::string str = s.Get<std::string>(""); | ||||
| return new EasyMeshLuaObject(str); | return new EasyMeshLuaObject(str); | ||||
| @@ -200,7 +198,8 @@ bool EasyMesh::Compile(char const *command, bool execute) | |||||
| { | { | ||||
| bool res = false; | bool res = false; | ||||
| // FIXME: make this work again | // FIXME: make this work again | ||||
| UNUSED(command, execute); | |||||
| (void)command; | |||||
| (void)execute; | |||||
| #if 0 | #if 0 | ||||
| EasyMeshCompiler mc(*this); | EasyMeshCompiler mc(*this); | ||||
| BD()->Enable(MeshBuildOperation::CommandRecording); | BD()->Enable(MeshBuildOperation::CommandRecording); | ||||
| @@ -684,7 +684,7 @@ std::string ShaderData::Patch(std::string const &code, ShaderType type) | |||||
| size_t l0 = strlen(rep[0]); | size_t l0 = strlen(rep[0]); | ||||
| size_t l1 = strlen(rep[1]); | size_t l1 = strlen(rep[1]); | ||||
| UNUSED(l1); | |||||
| (void)l1; | |||||
| std::string left = patched_code.substr(0, index); | std::string left = patched_code.substr(0, index); | ||||
| std::string right = patched_code.substr(index + l0, patched_code.length() - (index + l0)); | std::string right = patched_code.substr(index + l0, patched_code.length() - (index + l0)); | ||||
| @@ -1,7 +1,7 @@ | |||||
| // | // | ||||
| // Lol Engine | // Lol Engine | ||||
| // | // | ||||
| // Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net> | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | // | ||||
| // Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
| // the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
| @@ -115,9 +115,9 @@ ResourceCodecData* AndroidImageCodec::Load(std::string const &path) | |||||
| bool AndroidImageCodec::Save(std::string const &path, ResourceCodecData* data) | bool AndroidImageCodec::Save(std::string const &path, ResourceCodecData* data) | ||||
| { | { | ||||
| UNUSED(path, data); | |||||
| /* TODO: unimplemented */ | /* TODO: unimplemented */ | ||||
| (void)path; | |||||
| (void)data; | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -1,7 +1,7 @@ | |||||
| // | // | ||||
| // Lol Engine | // Lol Engine | ||||
| // | // | ||||
| // Copyright © 2010—2018 Sam Hocevar <sam@hocevar.net> | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | // | ||||
| // Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
| // the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
| @@ -82,9 +82,9 @@ ResourceCodecData* IosImageCodec::Load(std::string const &path) | |||||
| bool IosImageCodec::Save(std::string const &path, ResourceCodecData* data) | bool IosImageCodec::Save(std::string const &path, ResourceCodecData* data) | ||||
| { | { | ||||
| UNUSED(path, data); | |||||
| /* TODO: unimplemented */ | /* TODO: unimplemented */ | ||||
| (void)path; | |||||
| (void)data; | |||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -42,7 +42,7 @@ static std::string error2string(int errnum) | |||||
| /*static void ffmpeg_logger(void *ptr, int level, const char *fmt, va_list vl) | /*static void ffmpeg_logger(void *ptr, int level, const char *fmt, va_list vl) | ||||
| { | { | ||||
| // FIXME: use lol::msg::debug | // FIXME: use lol::msg::debug | ||||
| UNUSED(ptr, level); | |||||
| (void)ptr; (void)level; | |||||
| vfprintf(stderr, fmt, vl); | vfprintf(stderr, fmt, vl); | ||||
| }*/ | }*/ | ||||
| #endif | #endif | ||||
| @@ -100,7 +100,7 @@ bool movie::open_file(std::string const &filename) | |||||
| } | } | ||||
| return true; | return true; | ||||
| #else | #else | ||||
| UNUSED(filename); | |||||
| (void)filename; | |||||
| return false; | return false; | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -152,7 +152,7 @@ bool movie::push_image(image &im) | |||||
| } | } | ||||
| } | } | ||||
| #else | #else | ||||
| UNUSED(im); | |||||
| (void)im; | |||||
| #endif | #endif | ||||
| return true; | return true; | ||||
| @@ -137,7 +137,7 @@ void SubMesh::Render() | |||||
| m_vdecl->SetStream(m_vbos[i], attribs); | m_vdecl->SetStream(m_vbos[i], attribs); | ||||
| } | } | ||||
| UNUSED(vertex_count); | |||||
| (void)vertex_count; | |||||
| for (size_t i = 0; i < m_textures.size(); ++i) | for (size_t i = 0; i < m_textures.size(); ++i) | ||||
| { | { | ||||
| @@ -1,7 +1,7 @@ | |||||
| // | // | ||||
| // Lol Engine | // Lol Engine | ||||
| // | // | ||||
| // Copyright © 2010—2019 Sam Hocevar <sam@hocevar.net> | |||||
| // Copyright © 2010—2020 Sam Hocevar <sam@hocevar.net> | |||||
| // | // | ||||
| // Lol Engine is free software. It comes without any warranty, to | // Lol Engine is free software. It comes without any warranty, to | ||||
| // the extent permitted by applicable law. You can redistribute it | // the extent permitted by applicable law. You can redistribute it | ||||
| @@ -116,7 +116,7 @@ void Video::Capture(uint32_t *buffer) | |||||
| buffer[(height - j - 1) * width + i] = tmp; | buffer[(height - j - 1) * width + i] = tmp; | ||||
| } | } | ||||
| #else | #else | ||||
| UNUSED(buffer); | |||||
| (void)buffer; | |||||
| #endif | #endif | ||||
| } | } | ||||