From 66e82fa107f255f5e4b1f79bda7f54ae350cfd79 Mon Sep 17 00:00:00 2001
From: Elliu <elliu@hashi.re>
Date: Sat, 2 Sep 2023 13:07:23 +0200
Subject: [PATCH] BUILD: fix Clang warnings about reserved specifiers

Use "_vv_" instead of "___" for special struct members
---
 src/Lib/Ass/Line.cc | 12 ++++++------
 src/Lib/Ass/Line.hh |  2 +-
 src/Lib/Log.hh      |  4 ++--
 src/Lib/Utils.hh    |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/Lib/Ass/Line.cc b/src/Lib/Ass/Line.cc
index 3e518632..6ea03059 100644
--- a/src/Lib/Ass/Line.cc
+++ b/src/Lib/Ass/Line.cc
@@ -65,16 +65,16 @@ Line::Line(AssFactory *const factory, const QString &lineString)
     // Pop all but the text, it may contains `,` characters
     for (int i = 0; i < LineIndex::Text; ++i)
         contentList.removeFirst();
-    ___contentAsText = contentList.join("");
-    initSylFromString(___contentAsText);
+    contentAsText = contentList.join("");
+    initSylFromString(contentAsText);
 }
 
 void
 Line::sylsChanged() noexcept
 {
-    ___contentAsText = "";
+    contentAsText = "";
     for (const auto &syl : content)
-        ___contentAsText.append(syl->getAssText());
+        contentAsText.append(syl->getAssText());
 }
 
 void
@@ -174,7 +174,7 @@ Line::getEnd() const noexcept
 QString
 Line::getContentAsText() const noexcept
 {
-    return ___contentAsText;
+    return contentAsText;
 }
 
 QString
@@ -187,5 +187,5 @@ Line::getLineAsText() const noexcept
            styleProperties.name +
            QString::asprintf(",%s,%d,%d,%d,%s,", "", styleProperties.marginL,
                              styleProperties.marginR, styleProperties.marginV, "karaoke") +
-           ___contentAsText;
+           contentAsText;
 }
diff --git a/src/Lib/Ass/Line.hh b/src/Lib/Ass/Line.hh
index 5c8e176d..1a7bce03 100644
--- a/src/Lib/Ass/Line.hh
+++ b/src/Lib/Ass/Line.hh
@@ -25,7 +25,7 @@ class Line final {
     QString nameOrActor{};
     StyleWeakPtr lineStyle;
 
-    QString ___contentAsText;
+    QString contentAsText;
 
     AssFactory *const assFactory;
 
diff --git a/src/Lib/Log.hh b/src/Lib/Log.hh
index f81054e9..fc4b9b7a 100644
--- a/src/Lib/Log.hh
+++ b/src/Lib/Log.hh
@@ -70,13 +70,13 @@ struct LogLevel final {
         Warning,
         Error,
         Critical, // Will trigger qFatal
-        ___MaxAndUnused
+        _vv_MaxAndUnused
     };
 
     static const std::string_view toStdStringView(const LogLevel::Level) noexcept;
 
 private:
-    using Array = std::array<const std::string_view, ___MaxAndUnused>;
+    using Array = std::array<const std::string_view, _vv_MaxAndUnused>;
 
     // WARN: The order matters!
     static inline constexpr Array LevelsStringViews = { "None",   "Debug", "Info",
diff --git a/src/Lib/Utils.hh b/src/Lib/Utils.hh
index 1aa2d5e4..3783621e 100644
--- a/src/Lib/Utils.hh
+++ b/src/Lib/Utils.hh
@@ -106,7 +106,7 @@ concept StringType = requires(T str)
 enum class ThemeType { QtCreator, System, QssFile };
 
 // Prefered collor for a given type
-enum class VivyThemeType { Dark, Light, ___COUNT };
+enum class VivyThemeType { Dark, Light, _vv_COUNT };
 }
 
 namespace Vivy::Utils
-- 
GitLab