From 0b6fbcb363f465db026f4dfd9d85e2f4f06b6806 Mon Sep 17 00:00:00 2001 From: Cody Yu Date: Thu, 9 Apr 2020 20:38:14 +0000 Subject: [PATCH] address comment --- src/relay/analysis/annotated_region_set.cc | 2 +- src/relay/analysis/annotated_region_set.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay/analysis/annotated_region_set.cc b/src/relay/analysis/annotated_region_set.cc index c70ef8ae242e1..94c7621e60afc 100644 --- a/src/relay/analysis/annotated_region_set.cc +++ b/src/relay/analysis/annotated_region_set.cc @@ -79,7 +79,7 @@ void AnnotatedRegionSetNode::AddToRegion(AnnotatedRegion dest, const Expr& expr) } } -AnnotatedRegion AnnotatedRegionSetNode::MakeRegion(std::string target) { +AnnotatedRegion AnnotatedRegionSetNode::MakeRegion(const std::string& target) { auto ret = regions_.emplace(AnnotatedRegion()); (*ret.first)->id_ = region_id_++; (*ret.first)->target_ = target; diff --git a/src/relay/analysis/annotated_region_set.h b/src/relay/analysis/annotated_region_set.h index cfd044e797760..3bd569387d461 100644 --- a/src/relay/analysis/annotated_region_set.h +++ b/src/relay/analysis/annotated_region_set.h @@ -197,7 +197,7 @@ class AnnotatedRegionSetNode : public Object { * * \return The new region. */ - AnnotatedRegion MakeRegion(std::string target); + AnnotatedRegion MakeRegion(const std::string& target); std::unordered_set regions_; /*! \brief The next region ID to assign. */