Fix clang-tidy readability-const-return-type violations

This commit is contained in:
MarcoFalke
2023-01-20 16:25:14 +01:00
parent e1bf5470f9
commit fa451d4b60
25 changed files with 54 additions and 52 deletions

View File

@@ -49,7 +49,7 @@ std::string FeeModes(const std::string& delimiter)
return Join(FeeModeMap(), delimiter, [&](const std::pair<std::string, FeeEstimateMode>& i) { return i.first; });
}
const std::string InvalidEstimateModeErrorMessage()
std::string InvalidEstimateModeErrorMessage()
{
return "Invalid estimate_mode parameter, must be one of: \"" + FeeModes("\", \"") + "\"";
}

View File

@@ -13,6 +13,6 @@ enum class FeeReason;
bool FeeModeFromString(const std::string& mode_string, FeeEstimateMode& fee_estimate_mode);
std::string StringForFeeReason(FeeReason reason);
std::string FeeModes(const std::string& delimiter);
const std::string InvalidEstimateModeErrorMessage();
std::string InvalidEstimateModeErrorMessage();
#endif // BITCOIN_UTIL_FEES_H

View File

@@ -242,7 +242,7 @@ static std::optional<util::SettingsValue> InterpretValue(const KeyInfo& key, con
ArgsManager::ArgsManager() = default;
ArgsManager::~ArgsManager() = default;
const std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
{
std::set<std::string> unsuitables;
@@ -262,7 +262,7 @@ const std::set<std::string> ArgsManager::GetUnsuitableSectionOnlyArgs() const
return unsuitables;
}
const std::list<SectionInfo> ArgsManager::GetUnrecognizedSections() const
std::list<SectionInfo> ArgsManager::GetUnrecognizedSections() const
{
// Section names to be recognized in the config file.
static const std::set<std::string> available_sections{

View File

@@ -250,12 +250,12 @@ protected:
* on the command line or in a network-specific section in the
* config file.
*/
const std::set<std::string> GetUnsuitableSectionOnlyArgs() const;
std::set<std::string> GetUnsuitableSectionOnlyArgs() const;
/**
* Log warnings for unrecognized section names in the config file.
*/
const std::list<SectionInfo> GetUnrecognizedSections() const;
std::list<SectionInfo> GetUnrecognizedSections() const;
struct Command {
/** The command (if one has been registered with AddCommand), or empty */