From 2f5106c97f7c3c198650b1b6951b71c5d492aaa7 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Mon, 24 Aug 2015 11:19:19 +0200
Subject: [PATCH] tag/Settings: convert to C++

---
 Makefile.am                             | 2 +-
 src/TagPrint.cxx                        | 2 +-
 src/db/plugins/simple/DatabaseSave.cxx  | 2 +-
 src/tag/Set.cxx                         | 2 +-
 src/tag/{TagSettings.c => Settings.cxx} | 2 +-
 src/tag/{TagSettings.h => Settings.hxx} | 8 ++------
 src/tag/TagBuilder.cxx                  | 2 +-
 src/tag/TagConfig.cxx                   | 2 +-
 8 files changed, 9 insertions(+), 13 deletions(-)
 rename src/tag/{TagSettings.c => Settings.cxx} (97%)
 rename src/tag/{TagSettings.h => Settings.hxx} (93%)

diff --git a/Makefile.am b/Makefile.am
index 92fe0eddc..dc641391b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -818,7 +818,7 @@ libtag_a_SOURCES =\
 	src/tag/TagBuilder.cxx src/tag/TagBuilder.hxx \
 	src/tag/TagItem.hxx \
 	src/tag/TagHandler.cxx src/tag/TagHandler.hxx \
-	src/tag/TagSettings.c src/tag/TagSettings.h \
+	src/tag/Settings.cxx src/tag/Settings.hxx \
 	src/tag/TagConfig.cxx src/tag/TagConfig.hxx \
 	src/tag/TagNames.c \
 	src/tag/TagString.cxx src/tag/TagString.hxx \
diff --git a/src/TagPrint.cxx b/src/TagPrint.cxx
index 4a97d851e..d938d8fa5 100644
--- a/src/TagPrint.cxx
+++ b/src/TagPrint.cxx
@@ -20,7 +20,7 @@
 #include "config.h"
 #include "TagPrint.hxx"
 #include "tag/Tag.hxx"
-#include "tag/TagSettings.h"
+#include "tag/Settings.hxx"
 #include "client/Response.hxx"
 
 void
diff --git a/src/db/plugins/simple/DatabaseSave.cxx b/src/db/plugins/simple/DatabaseSave.cxx
index 02690dcf8..d2953b048 100644
--- a/src/db/plugins/simple/DatabaseSave.cxx
+++ b/src/db/plugins/simple/DatabaseSave.cxx
@@ -26,7 +26,7 @@
 #include "fs/io/BufferedOutputStream.hxx"
 #include "fs/io/TextFile.hxx"
 #include "tag/Tag.hxx"
-#include "tag/TagSettings.h"
+#include "tag/Settings.hxx"
 #include "fs/Charset.hxx"
 #include "util/StringUtil.hxx"
 #include "util/Error.hxx"
diff --git a/src/tag/Set.cxx b/src/tag/Set.cxx
index 24ca30ee3..30e4efe2d 100644
--- a/src/tag/Set.cxx
+++ b/src/tag/Set.cxx
@@ -19,7 +19,7 @@
 
 #include "Set.hxx"
 #include "TagBuilder.hxx"
-#include "TagSettings.h"
+#include "Settings.hxx"
 
 #include <assert.h>
 
diff --git a/src/tag/TagSettings.c b/src/tag/Settings.cxx
similarity index 97%
rename from src/tag/TagSettings.c
rename to src/tag/Settings.cxx
index 905265913..83c626db8 100644
--- a/src/tag/TagSettings.c
+++ b/src/tag/Settings.cxx
@@ -17,6 +17,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "TagSettings.h"
+#include "Settings.hxx"
 
 tag_mask_t global_tag_mask = (tag_mask_t)-1 & ~(1 << TAG_COMMENT);
diff --git a/src/tag/TagSettings.h b/src/tag/Settings.hxx
similarity index 93%
rename from src/tag/TagSettings.h
rename to src/tag/Settings.hxx
index 708517a08..42d0dc684 100644
--- a/src/tag/TagSettings.h
+++ b/src/tag/Settings.hxx
@@ -17,8 +17,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef MPD_TAG_SETTINGS_H
-#define MPD_TAG_SETTINGS_H
+#ifndef MPD_TAG_SETTINGS_HXX
+#define MPD_TAG_SETTINGS_HXX
 
 #include "TagType.h"
 #include "Compiler.h"
@@ -29,8 +29,6 @@ typedef uint_least32_t tag_mask_t;
 
 extern tag_mask_t global_tag_mask;
 
-#ifdef __cplusplus
-
 gcc_const
 static inline bool
 IsTagEnabled(unsigned tag)
@@ -46,5 +44,3 @@ IsTagEnabled(TagType tag)
 }
 
 #endif
-
-#endif
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx
index 4e810475f..4ce50cc4c 100644
--- a/src/tag/TagBuilder.cxx
+++ b/src/tag/TagBuilder.cxx
@@ -19,7 +19,7 @@
 
 #include "config.h"
 #include "TagBuilder.hxx"
-#include "TagSettings.h"
+#include "Settings.hxx"
 #include "TagPool.hxx"
 #include "TagString.hxx"
 #include "Tag.hxx"
diff --git a/src/tag/TagConfig.cxx b/src/tag/TagConfig.cxx
index de5faff32..b0e7b8ff0 100644
--- a/src/tag/TagConfig.cxx
+++ b/src/tag/TagConfig.cxx
@@ -19,7 +19,7 @@
 
 #include "config.h"
 #include "TagConfig.hxx"
-#include "TagSettings.h"
+#include "Settings.hxx"
 #include "Tag.hxx"
 #include "config/ConfigGlobal.hxx"
 #include "config/ConfigOption.hxx"