Use assignment to avoid gcc 8 ambiguity.
@@ -254,7 +254,7 @@ MetricSet::addTo(Metric& other, std::vector<Metric::UP> *ownerList) const
std::vector<Metric*> newOrder;
newOrder.reserve(o._metricOrder.size() + newMetrics.size());
for (const Metric* metric : _metricOrder) {
- TmpString v(metric->getMangledName());
+ TmpString v = metric->getMangledName();
target = std::lower_bound(map2.begin(), map2.end(), v);
if ((target != map2.end()) && (target->first == v)) {
newOrder.push_back(target->second);
@@ -267,7 +267,7 @@ MetricSet::addTo(Metric& other, std::vector<Metric::UP> *ownerList) const
}
// If target had unique metrics, add them at the end
for (Metric* metric : o._metricOrder) {
- TmpString v(metric->getMangledName());
+ TmpString v = metric->getMangledName();
if ( ! std::binary_search(map1.begin(), map1.end(), v) ) {
LOG(debug, "Metric %s exist in one snapshot but not other."
"Order will be messed up. Adding target unique "
