summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-13 16:20:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-13 16:20:30 +0200
commit68f5f213bf0cbd0bd60a6849bf4379113ea06282 (patch)
tree7906520ed59fe4ef7c03de91d55f4f74b87e4072 /api
parentdb47f9fc711f9b0abeb8461042c40c70d5a71021 (diff)
appease analyzer
Diffstat (limited to 'api')
-rw-r--r--api/plugin-api.cpp35
-rw-r--r--api/plugin-api.hpp16
2 files changed, 24 insertions, 27 deletions
diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp
index 0ce321c7..5a485d62 100644
--- a/api/plugin-api.cpp
+++ b/api/plugin-api.cpp
@@ -6,16 +6,16 @@ using namespace plugin_api::detail;
// these exist so that vtable is emitted in a single compilation unit, not all of them.
-Metadata_::~Metadata_() {}
-IFilter::~IFilter() {}
-IProtocol::~IProtocol() {}
-ITracker::~ITracker() {}
-IExtension::~IExtension() {}
+Metadata_::~Metadata_() = default;
+IFilter::~IFilter() = default;
+IProtocol::~IProtocol() = default;
+ITracker::~ITracker() = default;
+IExtension::~IExtension() = default;
void ITrackerDialog::register_tracker(ITracker*) {}
void ITrackerDialog::unregister_tracker() {}
-BaseDialog::BaseDialog() {}
+BaseDialog::BaseDialog() = default;
void BaseDialog::closeEvent(QCloseEvent*)
{
@@ -38,13 +38,13 @@ module_status ITracker::error(const QString& error)
return module_status(error);
}
-Metadata_::Metadata_() {}
-IFilter::IFilter() {}
-IFilterDialog::IFilterDialog() {}
-IProtocol::IProtocol() {}
-IProtocolDialog::IProtocolDialog() {}
-ITracker::ITracker() {}
-ITrackerDialog::ITrackerDialog() {}
+Metadata_::Metadata_() = default;
+IFilter::IFilter() = default;
+IFilterDialog::IFilterDialog() = default;
+IProtocol::IProtocol() = default;
+IProtocolDialog::IProtocolDialog() = default;
+ITracker::ITracker() = default;
+ITrackerDialog::ITrackerDialog() = default;
void BaseDialog::done(int)
{
@@ -55,9 +55,7 @@ void BaseDialog::done(int)
}
}
-IExtensionDialog::~IExtensionDialog()
-{
-}
+IExtensionDialog::~IExtensionDialog() = default;
bool module_status::is_ok() const
{
@@ -66,10 +64,13 @@ bool module_status::is_ok() const
module_status::module_status(QString error) : error(std::move(error)) {}
-module_status module_status_mixin::status_ok() { return module_status(); }
+module_status module_status_mixin::status_ok() { return {}; }
module_status module_status_mixin::error(const QString& error)
{
return module_status(error.isEmpty() ? "Unknown error" : error);
}
+
+Metadata::Metadata() = default;
+Metadata::~Metadata() = default;
diff --git a/api/plugin-api.hpp b/api/plugin-api.hpp
index 53d4fac6..72175d0a 100644
--- a/api/plugin-api.hpp
+++ b/api/plugin-api.hpp
@@ -42,24 +42,20 @@ private slots:
void done(int) override;
};
-} // ns
+} // ns plugin_api::detail
#define OTR_PLUGIN_EXPORT OTR_GENERIC_EXPORT
#define OPENTRACK_DECLARE_PLUGIN_INTERNAL(ctor_class, ctor_ret_class, metadata_class, dialog_class, dialog_ret_class) \
- extern "C" OTR_PLUGIN_EXPORT ctor_ret_class* GetConstructor(); \
- extern "C" OTR_PLUGIN_EXPORT Metadata_* GetMetadata(); \
- extern "C" OTR_PLUGIN_EXPORT dialog_ret_class* GetDialog(); \
- \
- extern "C" OTR_PLUGIN_EXPORT ctor_ret_class* GetConstructor() \
+ extern "C" OTR_PLUGIN_EXPORT ctor_ret_class* GetConstructor(void) \
{ \
return new ctor_class; \
} \
- extern "C" OTR_PLUGIN_EXPORT Metadata_* GetMetadata() \
+ extern "C" OTR_PLUGIN_EXPORT Metadata_* GetMetadata(void) \
{ \
return new metadata_class; \
} \
- extern "C" OTR_PLUGIN_EXPORT dialog_ret_class* GetDialog() \
+ extern "C" OTR_PLUGIN_EXPORT dialog_ret_class* GetDialog(void) \
{ \
return new dialog_class; \
}
@@ -84,8 +80,8 @@ class OTR_API_EXPORT Metadata : public TR, public Metadata_
Q_OBJECT
public:
- Metadata() {}
- ~Metadata() {}
+ Metadata();
+ ~Metadata();
};
struct OTR_API_EXPORT module_status final