quick check with linters
This commit is contained in:
@@ -48,8 +48,8 @@ inline audio::speakerid_t play_sound(
|
||||
),
|
||||
relative,
|
||||
volume,
|
||||
pitch,
|
||||
false,
|
||||
pitch,
|
||||
loop,
|
||||
audio::PRIORITY_NORMAL,
|
||||
channel
|
||||
);
|
||||
|
||||
@@ -39,7 +39,7 @@ static int l_open_world(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_reopen_world(lua_State* L) {
|
||||
static int l_reopen_world(lua_State*) {
|
||||
auto controller = scripting::engine->getController();
|
||||
controller->reopenWorld(scripting::level->getWorld());
|
||||
return 0;
|
||||
@@ -151,7 +151,7 @@ static int l_get_setting_info(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_quit(lua_State* L) {
|
||||
static int l_quit(lua_State*) {
|
||||
Window::setShouldClose(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ static int p_is_visible(UINode* node) {
|
||||
static int p_is_enabled(UINode* node) {
|
||||
return state->pushboolean(node->isEnabled());
|
||||
}
|
||||
static int p_move_into(UINode* node) {
|
||||
static int p_move_into(UINode*) {
|
||||
return state->pushcfunction(l_uinode_move_into);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ namespace scripting {
|
||||
extern Hud* hud;
|
||||
}
|
||||
|
||||
static int l_hud_open_inventory(lua_State* L) {
|
||||
static int l_hud_open_inventory(lua_State*) {
|
||||
if (!scripting::hud->isInventoryOpen()) {
|
||||
scripting::hud->openInventory();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_hud_close_inventory(lua_State* L) {
|
||||
static int l_hud_close_inventory(lua_State*) {
|
||||
if (scripting::hud->isInventoryOpen()) {
|
||||
scripting::hud->closeInventory();
|
||||
}
|
||||
@@ -99,12 +99,12 @@ static int l_hud_close(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_hud_pause(lua_State* L) {
|
||||
static int l_hud_pause(lua_State*) {
|
||||
scripting::hud->setPause(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_hud_resume(lua_State* L) {
|
||||
static int l_hud_resume(lua_State*) {
|
||||
scripting::hud->setPause(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ static int l_inventory_get(lua_State* L) {
|
||||
if (slotid < 0 || uint64_t(slotid) >= inv->size()) {
|
||||
luaL_error(L, "slot index is out of range [0, inventory.size(invid)]");
|
||||
}
|
||||
ItemStack& item = inv->getSlot(slotid);
|
||||
const ItemStack& item = inv->getSlot(slotid);
|
||||
lua_pushinteger(L, item.getItemId());
|
||||
lua_pushinteger(L, item.getCount());
|
||||
return 2;
|
||||
|
||||
@@ -50,7 +50,7 @@ static int l_pack_get_available(lua_State* L) {
|
||||
auto manager = scripting::engine->createPacksManager(worldFolder);
|
||||
manager.scan();
|
||||
|
||||
auto& installed = scripting::engine->getContentPacks();
|
||||
const auto& installed = scripting::engine->getContentPacks();
|
||||
for (auto& pack : installed) {
|
||||
manager.exclude(pack.id);
|
||||
}
|
||||
@@ -130,7 +130,7 @@ static int l_pack_get_info(lua_State* L) {
|
||||
|
||||
auto content = scripting::engine->getContent();
|
||||
auto& packs = scripting::engine->getContentPacks();
|
||||
auto found = std::find_if(packs.begin(), packs.end(), [packid](auto& pack) {
|
||||
auto found = std::find_if(packs.begin(), packs.end(), [packid](const auto& pack) {
|
||||
return pack.id == packid;
|
||||
});
|
||||
if (found == packs.end()) {
|
||||
|
||||
Reference in New Issue
Block a user