Skip to content

Commit

Permalink
Update to return const &
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jul 24, 2023
1 parent 327531a commit 5589947
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/gz/sensors/CameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace gz

/// \brief Get the camera optical frame
/// \return The camera optical frame
public: std::string OpticalFrameId() const;
public: const std::string& OpticalFrameId() const;

/// \brief Advertise camera info topic.
/// \return True if successful.
Expand Down
2 changes: 1 addition & 1 deletion src/CameraSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ bool CameraSensor::HasInfoConnections() const
}

//////////////////////////////////////////////////
std::string CameraSensor::OpticalFrameId() const
const std::string& CameraSensor::OpticalFrameId() const
{
return this->dataPtr->opticalFrameId;
}
Expand Down

0 comments on commit 5589947

Please sign in to comment.