diff --git a/include/sdf/Sky.hh b/include/sdf/Sky.hh index ab1f21922..8bb76a5ae 100644 --- a/include/sdf/Sky.hh +++ b/include/sdf/Sky.hh @@ -103,7 +103,7 @@ namespace sdf /// \brief Get the skybox texture URI. /// \return The URI of the skybox texture. - public: std::string CubemapUri() const; + public: const std::string &CubemapUri() const; /// \brief Set the skybox texture URI. /// \param[in] _uri The URI of the skybox texture. diff --git a/src/Sky.cc b/src/Sky.cc index 901316ad5..a97ae0242 100644 --- a/src/Sky.cc +++ b/src/Sky.cc @@ -158,7 +158,7 @@ void Sky::SetCloudAmbient(const ignition::math::Color &_ambient) } ////////////////////////////////////////////////// -std::string Sky::CubemapUri() const +const std::string &Sky::CubemapUri() const { return this->dataPtr->cubemapUri; }