From e25a125d8540f13410008dff7281b5d679ac9fcb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:13:45 -0700 Subject: Don't return by const copy --- toolsrc/include/SourceParagraph.h | 2 +- toolsrc/src/SourceParagraph.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 8563d83b0..3ee2138f1 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -27,7 +27,7 @@ namespace vcpkg // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector expand_qualified_dependencies(const std::vector& depends); - const std::string to_string(const Dependency& dep); + std::string to_string(const Dependency& dep); struct FeatureParagraph { diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 64b7bbad1..d8fa37914 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -220,11 +220,7 @@ namespace vcpkg return FeatureSpec::from_strings_and_triplet(filter_dependencies(deps, t), t); } - const std::string to_string(const Dependency& dep) - { - std::string name = dep.name(); - return name; - } + std::string to_string(const Dependency& dep) { return dep.name(); } ExpectedT> Supports::parse(const std::vector& strs) { -- cgit v1.2.3