Skip to content

Commit

Permalink
Update return types for Plugin's Name and Filename (#1055)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
  • Loading branch information
nkoenig and Nate Koenig authored Jun 23, 2022
1 parent 15718e8 commit aafcc64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/sdf/Plugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace sdf
/// The name of the plugin should be unique within the scope of its
/// parent.
/// \return Name of the plugin.
public: std::string Name() const;
public: const std::string &Name() const;

/// \brief Set the name of the plugin.
/// The name of the plugin should be unique within the scope of its
Expand All @@ -90,7 +90,7 @@ namespace sdf

/// \brief Get the filename of the shared library.
/// \return Filename of the shared library associated with the plugin.
public: std::string Filename() const;
public: const std::string &Filename() const;

/// \brief Remove the contents of the plugin, this is everything that
/// is a child element of the `<plugin>`.
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Errors Plugin::Load(ElementPtr _sdf)
}

/////////////////////////////////////////////////
std::string Plugin::Name() const
const std::string &Plugin::Name() const
{
return this->dataPtr->name;
}
Expand All @@ -137,7 +137,7 @@ void Plugin::SetName(const std::string &_name)
}

/////////////////////////////////////////////////
std::string Plugin::Filename() const
const std::string &Plugin::Filename() const
{
return this->dataPtr->filename;
}
Expand Down

0 comments on commit aafcc64

Please sign in to comment.