Don't return by const value

This commit is contained in:
Alexander Karatarakis 2016-11-29 11:33:32 -08:00
parent 372d339977
commit 519c542507
2 changed files with 4 additions and 4 deletions

View File

@ -46,8 +46,8 @@ namespace vcpkg
const ConfigurationType& config() const; const ConfigurationType& config() const;
const LinkageType& linkage() const; const LinkageType& linkage() const;
const std::regex crt_regex() const; std::regex crt_regex() const;
const std::string toString() const; std::string toString() const;
private: private:
BuildType(const ConfigurationType& config, const LinkageType& linkage, const std::string& crt_regex_as_string) BuildType(const ConfigurationType& config, const LinkageType& linkage, const std::string& crt_regex_as_string)

View File

@ -14,13 +14,13 @@ namespace vcpkg
return this->m_linkage; return this->m_linkage;
} }
const std::regex BuildType::crt_regex() const std::regex BuildType::crt_regex() const
{ {
const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase); const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
return r; return r;
} }
const std::string BuildType::toString() const std::string BuildType::toString() const
{ {
const std::string s = Strings::format("[%s,%s]", to_string(this->m_config), to_string(this->m_linkage)); const std::string s = Strings::format("[%s,%s]", to_string(this->m_config), to_string(this->m_linkage));
return s; return s;