From 7719bff8aedae6be86b373c1be29228ef1af25f7 Mon Sep 17 00:00:00 2001 From: Tomas Jakobsson Date: Fri, 10 Nov 2017 20:16:42 +0100 Subject: [PATCH] Clean up pugixml.hpp includes --- es-app/src/CollectionSystemManager.cpp | 1 + es-app/src/Gamelist.cpp | 1 + es-app/src/MetaData.cpp | 5 +++-- es-app/src/MetaData.h | 7 ++++--- es-app/src/SystemData.cpp | 1 + es-app/src/SystemScreenSaver.cpp | 1 + es-app/src/scrapers/GamesDBScraper.cpp | 1 + es-core/src/InputConfig.cpp | 5 +++-- es-core/src/InputConfig.h | 7 ++++--- es-core/src/InputManager.cpp | 1 + es-core/src/ThemeData.cpp | 1 + es-core/src/ThemeData.h | 3 ++- 12 files changed, 23 insertions(+), 11 deletions(-) diff --git a/es-app/src/CollectionSystemManager.cpp b/es-app/src/CollectionSystemManager.cpp index 2a5933fe2..536a445ff 100644 --- a/es-app/src/CollectionSystemManager.cpp +++ b/es-app/src/CollectionSystemManager.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/es-app/src/Gamelist.cpp b/es-app/src/Gamelist.cpp index 8581d3329..53c29ecdb 100644 --- a/es-app/src/Gamelist.cpp +++ b/es-app/src/Gamelist.cpp @@ -8,6 +8,7 @@ #include "Util.h" #include #include +#include namespace fs = boost::filesystem; diff --git a/es-app/src/MetaData.cpp b/es-app/src/MetaData.cpp index 5c6fb7f25..7f96a8c80 100644 --- a/es-app/src/MetaData.cpp +++ b/es-app/src/MetaData.cpp @@ -3,6 +3,7 @@ #include "Log.h" #include "Util.h" #include +#include namespace fs = boost::filesystem; @@ -69,7 +70,7 @@ MetaDataList::MetaDataList(MetaDataListType type) } -MetaDataList MetaDataList::createFromXML(MetaDataListType type, pugi::xml_node node, const fs::path& relativeTo) +MetaDataList MetaDataList::createFromXML(MetaDataListType type, pugi::xml_node& node, const fs::path& relativeTo) { MetaDataList mdl(type); @@ -95,7 +96,7 @@ MetaDataList MetaDataList::createFromXML(MetaDataListType type, pugi::xml_node n return mdl; } -void MetaDataList::appendToXML(pugi::xml_node parent, bool ignoreDefaults, const fs::path& relativeTo) const +void MetaDataList::appendToXML(pugi::xml_node& parent, bool ignoreDefaults, const fs::path& relativeTo) const { const std::vector& mdd = getMDD(); diff --git a/es-app/src/MetaData.h b/es-app/src/MetaData.h index 0fe4a9cc0..57fd26b7e 100644 --- a/es-app/src/MetaData.h +++ b/es-app/src/MetaData.h @@ -4,7 +4,8 @@ #include #include -#include + +namespace pugi { class xml_node; } enum MetaDataType { @@ -43,8 +44,8 @@ const std::vector& getMDDByType(MetaDataListType type); class MetaDataList { public: - static MetaDataList createFromXML(MetaDataListType type, pugi::xml_node node, const boost::filesystem::path& relativeTo); - void appendToXML(pugi::xml_node parent, bool ignoreDefaults, const boost::filesystem::path& relativeTo) const; + static MetaDataList createFromXML(MetaDataListType type, pugi::xml_node& node, const boost::filesystem::path& relativeTo); + void appendToXML(pugi::xml_node& parent, bool ignoreDefaults, const boost::filesystem::path& relativeTo) const; MetaDataList(MetaDataListType type); diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 2ee2d7bb5..620d334b1 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -9,6 +9,7 @@ #include "Settings.h" #include "ThemeData.h" #include +#include #include #ifdef WIN32 #include diff --git a/es-app/src/SystemScreenSaver.cpp b/es-app/src/SystemScreenSaver.cpp index 931efcec0..3dc23abb1 100644 --- a/es-app/src/SystemScreenSaver.cpp +++ b/es-app/src/SystemScreenSaver.cpp @@ -15,6 +15,7 @@ #include "SystemData.h" #include "Util.h" #include +#include #include #define FADE_TIME 300 diff --git a/es-app/src/scrapers/GamesDBScraper.cpp b/es-app/src/scrapers/GamesDBScraper.cpp index 77c98cccc..c265ce267 100644 --- a/es-app/src/scrapers/GamesDBScraper.cpp +++ b/es-app/src/scrapers/GamesDBScraper.cpp @@ -6,6 +6,7 @@ #include "Settings.h" #include "SystemData.h" #include "Util.h" +#include using namespace PlatformIds; const std::map gamesdb_platformid_map { diff --git a/es-core/src/InputConfig.cpp b/es-core/src/InputConfig.cpp index ea141ce67..5323fbc58 100644 --- a/es-core/src/InputConfig.cpp +++ b/es-core/src/InputConfig.cpp @@ -1,6 +1,7 @@ #include "InputConfig.h" #include "Log.h" +#include //some util functions std::string inputTypeToString(InputType type) @@ -146,7 +147,7 @@ std::vector InputConfig::getMappedTo(Input input) return maps; } -void InputConfig::loadFromXML(pugi::xml_node node) +void InputConfig::loadFromXML(pugi::xml_node& node) { clear(); @@ -172,7 +173,7 @@ void InputConfig::loadFromXML(pugi::xml_node node) } } -void InputConfig::writeToXML(pugi::xml_node parent) +void InputConfig::writeToXML(pugi::xml_node& parent) { pugi::xml_node cfg = parent.append_child("inputConfig"); diff --git a/es-core/src/InputConfig.h b/es-core/src/InputConfig.h index e217715cc..b1bd3c4e5 100644 --- a/es-core/src/InputConfig.h +++ b/es-core/src/InputConfig.h @@ -5,13 +5,14 @@ #ifdef HAVE_LIBCEC #include #endif // HAVE_LIBCEC -#include #include #include #include #include #include +namespace pugi { class xml_node; } + #define DEVICE_KEYBOARD -1 #define DEVICE_CEC -2 @@ -212,8 +213,8 @@ public: // Writes Input mapped to this name to result if true. bool getInputByName(const std::string& name, Input* result); - void loadFromXML(pugi::xml_node root); - void writeToXML(pugi::xml_node parent); + void loadFromXML(pugi::xml_node& root); + void writeToXML(pugi::xml_node& parent); bool isConfigured(); diff --git a/es-core/src/InputManager.cpp b/es-core/src/InputManager.cpp index b148f5745..4eeda88ad 100644 --- a/es-core/src/InputManager.cpp +++ b/es-core/src/InputManager.cpp @@ -5,6 +5,7 @@ #include "platform.h" #include "Window.h" #include +#include #include #include diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index d25987b67..830f97252 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -7,6 +7,7 @@ #include "Settings.h" #include #include +#include std::vector ThemeData::sSupportedViews { { "system" }, { "basic" }, { "detailed" }, { "video" } }; std::vector ThemeData::sSupportedFeatures { { "video" }, { "carousel" }, { "z-index" } }; diff --git a/es-core/src/ThemeData.h b/es-core/src/ThemeData.h index 55efdbec1..461e96575 100644 --- a/es-core/src/ThemeData.h +++ b/es-core/src/ThemeData.h @@ -6,11 +6,12 @@ #include #include #include -#include #include #include #include +namespace pugi { class xml_node; } + template class TextListComponent;