Implement getTariffProductForProductId() in terms of
getTariffProductForProductTypeName().
This commit is contained in:
		@@ -740,11 +740,16 @@ Configuration::getTariffProductForProductTypeName(QString const &permitTypeName)
 | 
			
		||||
 | 
			
		||||
std::optional<QVector<ATBTariffProduct>>
 | 
			
		||||
Configuration::getTariffProductForProductId(PermitType permitType) const {
 | 
			
		||||
    QString permitTypeName(permitType);
 | 
			
		||||
    return getTariffProductForProductTypeName(permitTypeName);
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    QVector<ATBTariffProduct> products;
 | 
			
		||||
    std::optional<QVector<ATBTariffProduct>> value;
 | 
			
		||||
 | 
			
		||||
    products.clear();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    for (auto[it, rangeEnd] = this->TariffProduct.equal_range(permitType); it != rangeEnd; ++it) {
 | 
			
		||||
        products.append(it->second);
 | 
			
		||||
    }
 | 
			
		||||
@@ -754,6 +759,7 @@ Configuration::getTariffProductForProductId(PermitType permitType) const {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return value;
 | 
			
		||||
    */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
std::optional<QVector<ATBTariffProduct>>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user