Ver código fonte

Resolves some LGTM alerts

aleos 4 anos atrás
pai
commit
c8a3b7dc16
2 arquivos alterados com 4 adições e 4 exclusões
  1. 2 2
      src/map/item_synthesis.cpp
  2. 2 2
      src/map/item_upgrade.cpp

+ 2 - 2
src/map/item_synthesis.cpp

@@ -66,7 +66,7 @@ uint64 ItemSynthesisDatabase::parseBodyNode(const YAML::Node &node) {
 	}
 
 	if (exists && this->nodeExists(node, "ClearSourceItem")) {
-		ShowNotice("item_synthesis: Cleared all items in SourceItem. Synthesis: %s (%u)\n", item->name, item->nameid);
+		ShowNotice("item_synthesis: Cleared all items in SourceItem. Synthesis: %s (%u)\n", item->name.c_str(), item->nameid);
 		if (!entry->sources.empty())
 			entry->sources.clear();
 	}
@@ -96,7 +96,7 @@ uint64 ItemSynthesisDatabase::parseBodyNode(const YAML::Node &node) {
 
 			if (exists && this->nodeExists(source, "Remove")) {
 				entry->sources.erase(std::remove_if(entry->sources.begin(), entry->sources.end(), [&source_item](const s_item_synthesis_source &x) { return x.nameid == source_item.nameid; }));
-				ShowNotice("item_synthesis: Removed %s (%u) from SourceItem. Synthesis: %s (%u)\n", source_it->name, source_item.nameid, item->name, item->nameid);
+				ShowNotice("item_synthesis: Removed %s (%u) from SourceItem. Synthesis: %s (%u)\n", source_it->name.c_str(), source_item.nameid, item->name.c_str(), item->nameid);
 				continue;
 			}
 

+ 2 - 2
src/map/item_upgrade.cpp

@@ -69,7 +69,7 @@ uint64 ItemUpgradeDatabase::parseBodyNode(const YAML::Node &node) {
 	}
 
 	if (exists && this->nodeExists(node, "ClearTargetItem")) {
-		ShowNotice("item_upgrade: Cleared all items in TargetItem. Upgrade: %s (%u)\n", item->name, item->nameid);
+		ShowNotice("item_upgrade: Cleared all items in TargetItem. Upgrade: %s (%u)\n", item->name.c_str(), item->nameid);
 		if (!entry->targets.empty())
 			entry->targets.clear();
 	}
@@ -93,7 +93,7 @@ uint64 ItemUpgradeDatabase::parseBodyNode(const YAML::Node &node) {
 
 			if (exists && this->nodeExists(target, "Remove")) {
 				entry->targets.erase(std::remove_if(entry->targets.begin(), entry->targets.end(), [&itemid](const t_itemid &x) { return x == itemid; }));
-				ShowNotice("item_upgrade: Removed %s (%u) from TargetItem. Upgrade: %s (%u)\n", target_item->name, itemid, item->name, item->nameid);
+				ShowNotice("item_upgrade: Removed %s (%u) from TargetItem. Upgrade: %s (%u)\n", target_item->name.c_str(), itemid, item->name.c_str(), item->nameid);
 				continue;
 			}