Skip to content

Commit

Permalink
No need for const in return by value
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Sep 26, 2023
1 parent ca3f7c4 commit b7a62ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions libmamba/include/mamba/core/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ namespace mamba
const std::string& name() const;
const std::string& canonical_name() const;
const std::vector<std::string>& platforms() const;
const std::optional<std::string> auth() const;
const std::optional<std::string> user() const;
const std::optional<std::string> password() const;
const std::optional<std::string> token() const;
const std::optional<std::string> package_filename() const;
std::optional<std::string> auth() const;
std::optional<std::string> user() const;
std::optional<std::string> password() const;
std::optional<std::string> token() const;
std::optional<std::string> package_filename() const;
const validation::RepoChecker&
repo_checker(Context& context, MultiPackageCache& caches) const;

Expand Down
10 changes: 5 additions & 5 deletions libmamba/src/core/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,27 +286,27 @@ namespace mamba
return m_platforms;
}

const std::optional<std::string> Channel::auth() const
std::optional<std::string> Channel::auth() const
{
return nonempty_str(m_url.authentication());
}

const std::optional<std::string> Channel::user() const
std::optional<std::string> Channel::user() const
{
return nonempty_str(m_url.user());
}

const std::optional<std::string> Channel::password() const
std::optional<std::string> Channel::password() const
{
return nonempty_str(m_url.password());
}

const std::optional<std::string> Channel::token() const
std::optional<std::string> Channel::token() const
{
return nonempty_str(std::string(m_url.token()));
}

const std::optional<std::string> Channel::package_filename() const
std::optional<std::string> Channel::package_filename() const
{
return nonempty_str(m_url.package());
}
Expand Down

0 comments on commit b7a62ed

Please sign in to comment.