From d65936200a2756e6619a109fa6fa673b91df802e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 26 Jun 2018 22:25:22 +0200 Subject: modernize C++ syntax No visible changes (hopefully). --- api/plugin-api.cpp | 5 +++-- api/plugin-api.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'api') diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp index 004938f1..0ce321c7 100644 --- a/api/plugin-api.cpp +++ b/api/plugin-api.cpp @@ -1,5 +1,6 @@ #include "plugin-api.hpp" -#include "compat/macros.hpp" + +#include using namespace plugin_api::detail; @@ -63,7 +64,7 @@ bool module_status::is_ok() const return error.isNull(); } -module_status::module_status(const QString& error) : error(error) {} +module_status::module_status(QString error) : error(std::move(error)) {} module_status module_status_mixin::status_ok() { return module_status(); } diff --git a/api/plugin-api.hpp b/api/plugin-api.hpp index 75555e93..b23a5010 100644 --- a/api/plugin-api.hpp +++ b/api/plugin-api.hpp @@ -95,7 +95,7 @@ struct OTR_API_EXPORT module_status final QString error; bool is_ok() const; - module_status(const QString& error = QString()); + module_status(QString error = {}); }; /* -- cgit v1.2.3