mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-19 12:16:16 -04:00
clang-tidy: Apply readability-const-return-type
This commit is contained in:
committed by
Johannes Lorenz
parent
f89d52fa21
commit
22eb7a1364
@@ -9,6 +9,7 @@ Checks: >
|
||||
modernize-use-equals-delete,
|
||||
modernize-use-override,
|
||||
performance-trivially-destructible,
|
||||
readability-const-return-type,
|
||||
readability-identifier-naming,
|
||||
readability-misleading-indentation,
|
||||
readability-simplify-boolean-expr,
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
float valueAt( const TimePos & _time ) const;
|
||||
float *valuesAfter( const TimePos & _time ) const;
|
||||
|
||||
const QString name() const;
|
||||
QString name() const;
|
||||
|
||||
// settings-management
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
|
||||
@@ -47,7 +47,7 @@ class LMMS_EXPORT PluginFactory
|
||||
public:
|
||||
struct PluginInfo
|
||||
{
|
||||
const QString name() const;
|
||||
QString name() const;
|
||||
QFileInfo file;
|
||||
std::shared_ptr<QLibrary> library = nullptr;
|
||||
Plugin::Descriptor* descriptor = nullptr;
|
||||
@@ -67,8 +67,8 @@ public:
|
||||
static PluginFactory* instance();
|
||||
|
||||
/// Returns a list of all found plugins' descriptors.
|
||||
const Plugin::DescriptorList descriptors() const;
|
||||
const Plugin::DescriptorList descriptors(Plugin::PluginTypes type) const;
|
||||
Plugin::DescriptorList descriptors() const;
|
||||
Plugin::DescriptorList descriptors(Plugin::PluginTypes type) const;
|
||||
|
||||
struct PluginInfoAndKey
|
||||
{
|
||||
@@ -80,12 +80,12 @@ public:
|
||||
/// Returns a list of all found plugins' PluginFactory::PluginInfo objects.
|
||||
const PluginInfoList& pluginInfos() const;
|
||||
/// Returns a plugin that support the given file extension
|
||||
const PluginInfoAndKey pluginSupportingExtension(const QString& ext);
|
||||
PluginInfoAndKey pluginSupportingExtension(const QString& ext);
|
||||
|
||||
/// Returns the PluginInfo object of the plugin with the given name.
|
||||
/// If the plugin is not found, an empty PluginInfo is returned (use
|
||||
/// PluginInfo::isNull() to check this).
|
||||
const PluginInfo pluginInfo(const char* name) const;
|
||||
PluginInfo pluginInfo(const char* name) const;
|
||||
|
||||
/// When loading a library fails during discovery, the error string is saved.
|
||||
/// It can be retrieved by calling this function.
|
||||
|
||||
@@ -857,7 +857,7 @@ void AutomationClip::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
const QString AutomationClip::name() const
|
||||
QString AutomationClip::name() const
|
||||
{
|
||||
QMutexLocker m(&m_clipMutex);
|
||||
|
||||
@@ -1173,4 +1173,4 @@ void AutomationClip::generateTangents(timeMap::iterator it, int numToGenerate)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
} // namespace lmms
|
||||
|
||||
@@ -105,12 +105,12 @@ PluginFactory* getPluginFactory()
|
||||
return PluginFactory::instance();
|
||||
}
|
||||
|
||||
const Plugin::DescriptorList PluginFactory::descriptors() const
|
||||
Plugin::DescriptorList PluginFactory::descriptors() const
|
||||
{
|
||||
return m_descriptors.values();
|
||||
}
|
||||
|
||||
const Plugin::DescriptorList PluginFactory::descriptors(Plugin::PluginTypes type) const
|
||||
Plugin::DescriptorList PluginFactory::descriptors(Plugin::PluginTypes type) const
|
||||
{
|
||||
return m_descriptors.values(type);
|
||||
}
|
||||
@@ -120,12 +120,12 @@ const PluginFactory::PluginInfoList& PluginFactory::pluginInfos() const
|
||||
return m_pluginInfos;
|
||||
}
|
||||
|
||||
const PluginFactory::PluginInfoAndKey PluginFactory::pluginSupportingExtension(const QString& ext)
|
||||
PluginFactory::PluginInfoAndKey PluginFactory::pluginSupportingExtension(const QString& ext)
|
||||
{
|
||||
return m_pluginByExt.value(ext, PluginInfoAndKey());
|
||||
}
|
||||
|
||||
const PluginFactory::PluginInfo PluginFactory::pluginInfo(const char* name) const
|
||||
PluginFactory::PluginInfo PluginFactory::pluginInfo(const char* name) const
|
||||
{
|
||||
for (const PluginInfo& info : m_pluginInfos)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ void PluginFactory::discoverPlugins()
|
||||
|
||||
|
||||
|
||||
const QString PluginFactory::PluginInfo::name() const
|
||||
QString PluginFactory::PluginInfo::name() const
|
||||
{
|
||||
return descriptor ? descriptor->name : QString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user