Galaxy: Small optimization to galaxyAPI::getFilteredDepotItemsVectorFromJson

Check if product id exists once instead of checking it again for each item
This commit is contained in:
Sude 2018-09-05 18:21:35 +03:00
parent 05e9409d52
commit 6f44277d4c

View File

@ -513,9 +513,9 @@ std::vector<galaxyDepotItem> galaxyAPI::getFilteredDepotItemsVectorFromJson(cons
items = this->getDepotItemsVector(depotHash, is_dependency);
// Set product id for items
for (auto it = items.begin(); it != items.end(); ++it)
if (!depot_product_id.empty())
{
if (!depot_product_id.empty())
for (auto it = items.begin(); it != items.end(); ++it)
{
it->product_id = depot_product_id;
}