1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-06 13:13:22 +00:00

Reduce number of includes for boost/program_options

This commit is contained in:
elsid 2022-06-25 17:51:01 +02:00
parent 47cfaef7d2
commit 10fbf170a2
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625
10 changed files with 34 additions and 3 deletions

View File

@ -10,6 +10,9 @@
#include <QCloseEvent> #include <QCloseEvent>
#include <QTextCodec> #include <QTextCodec>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
#include "playpage.hpp" #include "playpage.hpp"
#include "graphicspage.hpp" #include "graphicspage.hpp"
#include "datafilespage.hpp" #include "datafilespage.hpp"

View File

@ -5,6 +5,8 @@
#include <QLocalSocket> #include <QLocalSocket>
#include <QMessageBox> #include <QMessageBox>
#include <boost/program_options/options_description.hpp>
#include <components/debug/debugging.hpp> #include <components/debug/debugging.hpp>
#include <components/debug/debuglog.hpp> #include <components/debug/debuglog.hpp>
#include <components/fallback/validate.hpp> #include <components/fallback/validate.hpp>

View File

@ -3,6 +3,7 @@
#include <boost/interprocess/sync/file_lock.hpp> #include <boost/interprocess/sync/file_lock.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
#include <boost/program_options/variables_map.hpp>
#include <QObject> #include <QObject>
#include <QString> #include <QString>

View File

@ -11,6 +11,8 @@
#include "engine.hpp" #include "engine.hpp"
#include "options.hpp" #include "options.hpp"
#include <boost/program_options/variables_map.hpp>
#if defined(_WIN32) #if defined(_WIN32)
#include <components/windows.hpp> #include <components/windows.hpp>
// makes __argc and __argv available on windows // makes __argc and __argv available on windows

View File

@ -2,6 +2,9 @@
#include <fstream> #include <fstream>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
#include <components/esm3/esmreader.hpp> #include <components/esm3/esmreader.hpp>
#include <components/esm3/esmwriter.hpp> #include <components/esm3/esmwriter.hpp>

View File

@ -4,6 +4,9 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <gmock/gmock.h> #include <gmock/gmock.h>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
#include <array> #include <array>
#include <algorithm> #include <algorithm>
#include <string> #include <string>

View File

@ -1,5 +1,8 @@
#include "validate.hpp" #include "validate.hpp"
#include <boost/any.hpp>
#include <boost/program_options/errors.hpp>
void Fallback::validate(boost::any& v, std::vector<std::string> const& tokens, FallbackMap*, int) void Fallback::validate(boost::any& v, std::vector<std::string> const& tokens, FallbackMap*, int)
{ {
if (v.empty()) if (v.empty())

View File

@ -1,12 +1,19 @@
#ifndef OPENMW_COMPONENTS_FALLBACK_VALIDATE_H #ifndef OPENMW_COMPONENTS_FALLBACK_VALIDATE_H
#define OPENMW_COMPONENTS_FALLBACK_VALIDATE_H #define OPENMW_COMPONENTS_FALLBACK_VALIDATE_H
#include <boost/program_options.hpp> #include <map>
#include <string>
#include <vector>
// Parses and validates a fallback map from boost program_options. // Parses and validates a fallback map from boost program_options.
// Note: for boost to pick up the validate function, you need to pull in the namespace e.g. // Note: for boost to pick up the validate function, you need to pull in the namespace e.g.
// by using namespace Fallback; // by using namespace Fallback;
namespace boost
{
class any;
}
namespace Fallback namespace Fallback
{ {

View File

@ -5,6 +5,9 @@
#include <components/fallback/validate.hpp> #include <components/fallback/validate.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options/options_description.hpp>
/** /**
* \namespace Files * \namespace Files
*/ */

View File

@ -5,11 +5,15 @@
#include <optional> #include <optional>
#include <stack> #include <stack>
#include <boost/program_options.hpp>
#include <components/files/fixedpath.hpp> #include <components/files/fixedpath.hpp>
#include <components/files/collections.hpp> #include <components/files/collections.hpp>
namespace boost::program_options
{
class options_description;
class variables_map;
}
/** /**
* \namespace Files * \namespace Files
*/ */