chore: fix shadowed member and signed/unsigned mismatch

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: supress unused with [[maybe_unused]]

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: unshadow ^&^& static_cast implicit return

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused in parse task

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused in folder models

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused with instances

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: more deshadow and unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: remove uneeded simicolons

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: prevent shadow

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-06-30 23:51:15 -07:00
parent 98d6904e4a
commit 8d7dcdfc5b
96 changed files with 409 additions and 413 deletions

View File

@ -408,13 +408,13 @@ optional<QString> read_string (nbt::value& parent, const char * name)
auto & tag_str = namedValue.as<nbt::tag_string>();
return QString::fromStdString(tag_str.get());
}
catch (const std::out_of_range &e)
catch ([[maybe_unused]] const std::out_of_range &e)
{
// fallback for old world formats
qWarning() << "String NBT tag" << name << "could not be found.";
return nullopt;
}
catch (const std::bad_cast &e)
catch ([[maybe_unused]] const std::bad_cast &e)
{
// type mismatch
qWarning() << "NBT tag" << name << "could not be converted to string.";
@ -434,13 +434,13 @@ optional<int64_t> read_long (nbt::value& parent, const char * name)
auto & tag_str = namedValue.as<nbt::tag_long>();
return tag_str.get();
}
catch (const std::out_of_range &e)
catch ([[maybe_unused]] const std::out_of_range &e)
{
// fallback for old world formats
qWarning() << "Long NBT tag" << name << "could not be found.";
return nullopt;
}
catch (const std::bad_cast &e)
catch ([[maybe_unused]] const std::bad_cast &e)
{
// type mismatch
qWarning() << "NBT tag" << name << "could not be converted to long.";
@ -460,13 +460,13 @@ optional<int> read_int (nbt::value& parent, const char * name)
auto & tag_str = namedValue.as<nbt::tag_int>();
return tag_str.get();
}
catch (const std::out_of_range &e)
catch ([[maybe_unused]] const std::out_of_range &e)
{
// fallback for old world formats
qWarning() << "Int NBT tag" << name << "could not be found.";
return nullopt;
}
catch (const std::bad_cast &e)
catch ([[maybe_unused]] const std::bad_cast &e)
{
// type mismatch
qWarning() << "NBT tag" << name << "could not be converted to int.";