Revert "fix: optimization: Various PVS-Studio warnings"

This commit is contained in:
MihailRis
2024-08-02 14:51:44 +03:00
committed by GitHub
parent a7ef7bb365
commit ba046a52c0
90 changed files with 259 additions and 274 deletions
+2 -2
View File
@@ -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);