return by const reference when possible

This commit is contained in:
Crzyrndm 2018-07-09 14:17:04 +12:00
parent cf8991a234
commit dcf50cb4cd
4 changed files with 6 additions and 6 deletions

View File

@ -130,12 +130,12 @@ public:
/// <summary>
/// Returns the URI of the package part this relationship points to.
/// </summary>
uri source() const;
const uri &source() const;
/// <summary>
/// Returns the URI of the package part this relationship points to.
/// </summary>
uri target() const;
const uri &target() const;
/// <summary>
/// Returns true if and only if rhs is equal to this relationship.

View File

@ -123,7 +123,7 @@ public:
/// Returns the path of this URI.
/// E.g. the path of http://example.com/document is "/document"
/// </summary>
class path path() const;
const class path& path() const;
/// <summary>
/// Returns true if this URI has a non-null query string section.

View File

@ -46,12 +46,12 @@ target_mode relationship::target_mode() const
return mode_;
}
uri relationship::source() const
const uri &relationship::source() const
{
return source_;
}
uri relationship::target() const
const uri &relationship::target() const
{
return target_;
}

View File

@ -16,7 +16,7 @@ std::string uri::to_string() const
return path_.string();
}
path uri::path() const
const path& uri::path() const
{
return path_;
}