Revert "fix: optimization: Various PVS-Studio warnings"
This commit is contained in:
@@ -38,7 +38,8 @@ ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets) : conte
|
||||
}
|
||||
}
|
||||
|
||||
ContentGfxCache::~ContentGfxCache() = default;
|
||||
ContentGfxCache::~ContentGfxCache() {
|
||||
}
|
||||
|
||||
const Content* ContentGfxCache::getContent() const {
|
||||
return content;
|
||||
|
||||
@@ -81,7 +81,8 @@ LevelFrontend::LevelFrontend(
|
||||
);
|
||||
}
|
||||
|
||||
LevelFrontend::~LevelFrontend() = default;
|
||||
LevelFrontend::~LevelFrontend() {
|
||||
}
|
||||
|
||||
Level* LevelFrontend::getLevel() const {
|
||||
return level;
|
||||
|
||||
@@ -314,7 +314,7 @@ void Hud::openInventory() {
|
||||
}
|
||||
|
||||
void Hud::openInventory(
|
||||
const glm::ivec3& block,
|
||||
glm::ivec3 block,
|
||||
UiDocument* doc,
|
||||
std::shared_ptr<Inventory> blockinv,
|
||||
bool playerInventory
|
||||
@@ -406,9 +406,9 @@ void Hud::add(const HudElement& element) {
|
||||
using namespace dynamic;
|
||||
|
||||
gui->add(element.getNode());
|
||||
auto invview = std::dynamic_pointer_cast<InventoryView>(element.getNode());
|
||||
auto document = element.getDocument();
|
||||
if (document) {
|
||||
auto invview = std::dynamic_pointer_cast<InventoryView>(element.getNode());
|
||||
auto inventory = invview ? invview->getInventory() : nullptr;
|
||||
std::vector<Value> args;
|
||||
args.emplace_back(inventory ? inventory.get()->getId() : 0);
|
||||
|
||||
@@ -140,12 +140,12 @@ public:
|
||||
/// @brief Show block inventory in inventory-mode
|
||||
/// @param block block position
|
||||
/// @param doc block ui layout
|
||||
/// @param blockinv block inventory
|
||||
/// @param blockInv block inventory
|
||||
/// @param playerInventory show player inventory too
|
||||
void openInventory(
|
||||
const glm::ivec3& block,
|
||||
glm::ivec3 block,
|
||||
UiDocument* doc,
|
||||
std::shared_ptr<Inventory> blockinv,
|
||||
std::shared_ptr<Inventory> blockInv,
|
||||
bool playerInventory
|
||||
);
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void langs::load(const fs::path& resdir,
|
||||
if (locale != fallback) {
|
||||
load(resdir, locale, packs, *lang.get());
|
||||
}
|
||||
current = std::move(lang);
|
||||
current.reset(lang.release());
|
||||
}
|
||||
|
||||
void langs::setup(const fs::path& resdir,
|
||||
|
||||
Reference in New Issue
Block a user