add guards around string constants and into an anonymous namespace
authortnixeu <4436784+tnixeu@users.noreply.github.com>
Sat, 29 Oct 2022 00:19:35 +0000 (02:19 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Mon, 14 Nov 2022 07:41:47 +0000 (08:41 +0100)
Signed-off-by: tnixeu <4436784+tnixeu@users.noreply.github.com>
src/gui/folder.cpp
src/gui/folderman.cpp

index 9a50716a1c6bad22f2346e08bc73428eae4ac6f5..a14d8b7c3e09eaef3fac0e9b5b25e3335ceb5ab5 100644 (file)
 #include <QPushButton>
 #include <QApplication>
 
-static const char versionC[] = "version";
-
+namespace {
+#ifndef VERSION_C
+#define VERSION_C
+constexpr auto versionC= "version";
+#endif
+}
 namespace OCC {
 
 Q_LOGGING_CATEGORY(lcFolder, "nextcloud.gui.folder", QtInfoMsg)
index b71a9593da261890004cee74b2dc516145de0218..7b6582b68e944639aa479907706f034605235be6 100644 (file)
 #include <QSet>
 #include <QNetworkProxy>
 
-static const char versionC[] = "version";
+namespace {
+#ifndef VERSION_C
+#define VERSION_C
+constexpr auto versionC= "version";
+#endif
+}
 static const int maxFoldersVersion = 1;
 
 namespace OCC {