Skip to content

Commit

Permalink
SmrPlayer: remove references from setPlottedCourse
Browse files Browse the repository at this point in the history
The argument to this function should not be passed by reference.

See smrealms#317.
  • Loading branch information
hemberger committed May 16, 2018
1 parent 2218c0e commit 02f426f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Default/SmrPlayer.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1888,9 +1888,9 @@ class SmrPlayer extends AbstractSmrPlayer {
return $this->plottedCourse;
}

public function setPlottedCourse(Distance &$plottedCourse) {
public function setPlottedCourse(Distance $plottedCourse) {
$hadPlottedCourse = $this->hasPlottedCourse();
$this->plottedCourse =& $plottedCourse;
$this->plottedCourse = $plottedCourse;
if ($this->plottedCourse->getTotalSectors()>0)
$this->db->query('REPLACE INTO player_plotted_course
(account_id, game_id, course)
Expand Down

0 comments on commit 02f426f

Please sign in to comment.