Variant: Return const refs rather than string copies

This commit is contained in:
Paul Beckingham
2015-04-04 12:51:56 -04:00
parent fa7d4352cd
commit 8c0f46309b
2 changed files with 9 additions and 9 deletions

View File

@@ -166,7 +166,7 @@ void Variant::source (const std::string& input)
}
////////////////////////////////////////////////////////////////////////////////
std::string Variant::source () const
const std::string& Variant::source () const
{
return _source;
}
@@ -2174,7 +2174,7 @@ double Variant::get_real () const
}
////////////////////////////////////////////////////////////////////////////////
std::string Variant::get_string () const
const std::string& Variant::get_string () const
{
return _string;
}