From: tnixeu <4436784+tnixeu@users.noreply.github.com> Date: Sat, 29 Oct 2022 00:19:35 +0000 (+0200) Subject: add guards around string constants and into an anonymous namespace X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~141^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0b98f471edf146b488ce28a02789cca39003cbf1;p=nextcloud-desktop.git add guards around string constants and into an anonymous namespace Signed-off-by: tnixeu <4436784+tnixeu@users.noreply.github.com> --- diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 9a50716a1..a14d8b7c3 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -46,8 +46,12 @@ #include #include -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) diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index b71a9593d..7b6582b68 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -38,7 +38,12 @@ #include #include -static const char versionC[] = "version"; +namespace { +#ifndef VERSION_C +#define VERSION_C +constexpr auto versionC= "version"; +#endif +} static const int maxFoldersVersion = 1; namespace OCC {