diff options
author | 2018-08-24 11:20:19 -0700 | |
---|---|---|
committer | 2018-08-24 11:32:57 -0700 | |
commit | 197309b5d56436b523b8b03ddf2a23555c37365e (patch) | |
tree | 99b4a7898511df29ffac6623cb54418330a4838f /tensorflow/core/lib/monitoring/collection_registry.cc | |
parent | 8925649d62ae24a2c34f74b69ac95a1bed369b44 (diff) |
Removed redundant std::string -> string conversions.
PiperOrigin-RevId: 210127626
Diffstat (limited to 'tensorflow/core/lib/monitoring/collection_registry.cc')
-rw-r--r-- | tensorflow/core/lib/monitoring/collection_registry.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/core/lib/monitoring/collection_registry.cc b/tensorflow/core/lib/monitoring/collection_registry.cc index 8c28620ff9..fface033cb 100644 --- a/tensorflow/core/lib/monitoring/collection_registry.cc +++ b/tensorflow/core/lib/monitoring/collection_registry.cc @@ -38,15 +38,15 @@ void Collector::CollectMetricDescriptor( mutex_lock l(mu_); return collected_metrics_->metric_descriptor_map .insert(std::make_pair( - std::string(metric_def->name()), + string(metric_def->name()), std::unique_ptr<MetricDescriptor>(new MetricDescriptor()))) .first->second.get(); }(); - metric_descriptor->name = std::string(metric_def->name()); - metric_descriptor->description = std::string(metric_def->description()); + metric_descriptor->name = string(metric_def->name()); + metric_descriptor->description = string(metric_def->description()); for (const StringPiece label_name : metric_def->label_descriptions()) { - metric_descriptor->label_names.push_back(std::string(label_name)); + metric_descriptor->label_names.emplace_back(label_name); } metric_descriptor->metric_kind = metric_def->kind(); |