Browse Source

make sonar happy

Laserlicht 3 weeks ago
parent
commit
e4cd9895be
1 changed files with 2 additions and 2 deletions
  1. 2 2
      client/adventureMap/AdventureMapWidget.cpp

+ 2 - 2
client/adventureMap/AdventureMapWidget.cpp

@@ -297,7 +297,7 @@ std::shared_ptr<CIntObject> AdventureMapWidget::buildResourceDateBar(const JsonN
 
 	auto result = std::make_shared<CResDataBar>(image, area.topLeft());
 
-	for (auto & i : LIBRARY->resourceTypeHandler->getAllObjects())
+	for (const auto & i : LIBRARY->resourceTypeHandler->getAllObjects())
 	{
 		const auto & node = input[i.toResource()->getJsonKey()];
 
@@ -340,7 +340,7 @@ std::shared_ptr<CIntObject> AdventureMapWidget::buildResourceAdditional(const Js
 	int remainingSpace = area.w;
 	int resElementSize = 84;
 	int fitOffset = 2;
-	for(auto & resource : LIBRARY->resourceTypeHandler->getAllObjects())
+	for(const auto & resource : LIBRARY->resourceTypeHandler->getAllObjects())
 	{
 		if(resource.getNum() < GameConstants::RESOURCE_QUANTITY)
 			continue;