diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-18 09:12:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-18 09:38:58 +0100 |
commit | 500fe34d7b7b64a5cf7af7b518438db3840e5446 (patch) | |
tree | 8c904913f36083ea766c001246f39164f9e02064 | |
parent | 0e1617e876c59d4f4658ebf25630a1f1c7fa93cd (diff) |
options: use string literals directly
-rw-r--r-- | options/value.hpp | 5 |
1 files 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<unsigned k> + inline value(bundle b, const char (&name)[k], t def) : value(b, QLatin1String(name, k-1), def) { + static_assert(k > 0, ""); } never_inline |