From 500fe34d7b7b64a5cf7af7b518438db3840e5446 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 18 Dec 2017 09:12:11 +0100 Subject: options: use string literals directly --- options/value.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/options/value.hpp b/options/value.hpp index 244f23fd..37a2f317 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -83,9 +83,10 @@ public: DIRECT_CONNTYPE); } - never_inline - value(bundle b, const char* name, t def) : value(b, QString(name), def) + template + inline value(bundle b, const char (&name)[k], t def) : value(b, QLatin1String(name, k-1), def) { + static_assert(k > 0, ""); } never_inline -- cgit v1.2.3