Skip to content

Commit

Permalink
#5151: Avoid returning a reference to a temporary object
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 11, 2020
1 parent eae81b8 commit 4304b1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion radiant/entity/target/TargetLineNode.cpp
Expand Up @@ -48,7 +48,7 @@ std::size_t TargetLineNode::getHighlightFlags()
return Highlight::NoHighlight;
}

const Vector3& TargetLineNode::getOwnerPosition() const
Vector3 TargetLineNode::getOwnerPosition() const
{
try
{
Expand Down
2 changes: 1 addition & 1 deletion radiant/entity/target/TargetLineNode.h
Expand Up @@ -41,7 +41,7 @@ class TargetLineNode :
std::size_t getHighlightFlags() override;

private:
const Vector3& getOwnerPosition() const;
Vector3 getOwnerPosition() const;
};

}

0 comments on commit 4304b1f

Please sign in to comment.