Skip to content

Commit

Permalink
GenericParser2: Not returning reference to temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwonko committed Nov 22, 2015
1 parent 54d16f9 commit 1f741de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/game/genericparser2.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class CGPProperty
}
const gsl::cstring_view& GetTopValue() const NOEXCEPT
{
return mValues.empty() ? gsl::cstring_view{} : mValues.front();
static gsl::cstring_view empty{};
return mValues.empty() ? empty : mValues.front();
}
const Values& GetValues() const NOEXCEPT
{
Expand Down

0 comments on commit 1f741de

Please sign in to comment.