Bläddra i källkod

Remove uses of the UNUSED macro.

legacy
Sam Hocevar 4 år sedan
förälder
incheckning
d92dd6fc3c
9 ändrade filer med 22 tillägg och 28 borttagningar
  1. +3
    -6
      doc/tutorial/14_lua.cpp
  2. +3
    -5
      src/application/android-app.cpp
  3. +3
    -4
      src/easymesh/easymeshlua.cpp
  4. +1
    -1
      src/gpu/shader.cpp
  5. +3
    -3
      src/image/codec/android-image.cpp
  6. +3
    -3
      src/image/codec/ios-image.cpp
  7. +3
    -3
      src/image/movie.cpp
  8. +1
    -1
      src/mesh/mesh.cpp
  9. +2
    -2
      src/video.cpp

+ 3
- 6
doc/tutorial/14_lua.cpp Visa fil

@@ -2,7 +2,7 @@
// Lol Engine — Lua tutorial
//
// 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
// the extent permitted by applicable law. You can redistribute it
@@ -29,10 +29,8 @@ class DemoObject : public LuaObject
public:
DemoObject() : LuaObject() {}
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();
}

@@ -61,9 +59,8 @@ public:
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);
}



+ 3
- 5
src/application/android-app.cpp Visa fil

@@ -1,7 +1,7 @@
//
// 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
// 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__ */


+ 3
- 4
src/easymesh/easymeshlua.cpp Visa fil

@@ -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);
std::string str = s.Get<std::string>("");
return new EasyMeshLuaObject(str);
@@ -200,7 +198,8 @@ bool EasyMesh::Compile(char const *command, bool execute)
{
bool res = false;
// FIXME: make this work again
UNUSED(command, execute);
(void)command;
(void)execute;
#if 0
EasyMeshCompiler mc(*this);
BD()->Enable(MeshBuildOperation::CommandRecording);


+ 1
- 1
src/gpu/shader.cpp Visa fil

@@ -684,7 +684,7 @@ std::string ShaderData::Patch(std::string const &code, ShaderType type)

size_t l0 = strlen(rep[0]);
size_t l1 = strlen(rep[1]);
UNUSED(l1);
(void)l1;

std::string left = patched_code.substr(0, index);
std::string right = patched_code.substr(index + l0, patched_code.length() - (index + l0));


+ 3
- 3
src/image/codec/android-image.cpp Visa fil

@@ -1,7 +1,7 @@
//
// 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
// 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)
{
UNUSED(path, data);

/* TODO: unimplemented */
(void)path;
(void)data;
return false;
}



+ 3
- 3
src/image/codec/ios-image.cpp Visa fil

@@ -1,7 +1,7 @@
//
// 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
// 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)
{
UNUSED(path, data);

/* TODO: unimplemented */
(void)path;
(void)data;
return true;
}



+ 3
- 3
src/image/movie.cpp Visa fil

@@ -42,7 +42,7 @@ static std::string error2string(int errnum)
/*static void ffmpeg_logger(void *ptr, int level, const char *fmt, va_list vl)
{
// FIXME: use lol::msg::debug
UNUSED(ptr, level);
(void)ptr; (void)level;
vfprintf(stderr, fmt, vl);
}*/
#endif
@@ -100,7 +100,7 @@ bool movie::open_file(std::string const &filename)
}
return true;
#else
UNUSED(filename);
(void)filename;
return false;
#endif
}
@@ -152,7 +152,7 @@ bool movie::push_image(image &im)
}
}
#else
UNUSED(im);
(void)im;
#endif

return true;


+ 1
- 1
src/mesh/mesh.cpp Visa fil

@@ -137,7 +137,7 @@ void SubMesh::Render()
m_vdecl->SetStream(m_vbos[i], attribs);
}

UNUSED(vertex_count);
(void)vertex_count;

for (size_t i = 0; i < m_textures.size(); ++i)
{


+ 2
- 2
src/video.cpp Visa fil

@@ -1,7 +1,7 @@
//
// 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
// 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;
}
#else
UNUSED(buffer);
(void)buffer;
#endif
}



Laddar…
Avbryt
Spara