From 6a07ccbad273cdcbea3f984c5c2e9d1b272aae05 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 7 Jan 2018 15:42:28 +0100 Subject: Use helper function empty_string() instead of manual checks For code consistency, substitute boolean expressions: s && *s -> !empty_string(s) s && s[0] -> !empty_string(s) !s || !*s -> empty_string(s) !s || !s[0] -> empty_string(s) Signed-off-by: Berthold Stoeger --- core/qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/qthelper.cpp') diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 6916b1a68..262399a5f 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -1163,7 +1163,7 @@ QString localFilePath(const QString originalFilename) QString fileFromHash(const char *hash) { - if (!hash || !*hash) + if (empty_string(hash)) return ""; QMutexLocker locker(&hashOfMutex); -- cgit v1.2.3-70-g09d2