summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-26 22:25:22 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:05:21 +0200
commitd65936200a2756e6619a109fa6fa673b91df802e (patch)
tree80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /api
parent4046773c41ee3c0f65840828ab983cfd13451c85 (diff)
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'api')
-rw-r--r--api/plugin-api.cpp5
-rw-r--r--api/plugin-api.hpp2
2 files changed, 4 insertions, 3 deletions
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 <utility>
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 = {});
};
/*