(ui,)settings: Use explicit instantiation

Reduces compile times a tad on clang.
This commit is contained in:
lat9nq
2023-06-10 23:40:39 -04:00
parent 02265f19d9
commit 04d4b6ab80
10 changed files with 613 additions and 475 deletions

View File

@ -102,9 +102,9 @@ const std::map<Settings::RendererBackend, QString> Config::renderer_backend_text
};
const std::map<Settings::ShaderBackend, QString> Config::shader_backend_texts_map = {
{Settings::ShaderBackend::GLSL, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLSL"))},
{Settings::ShaderBackend::GLASM, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLASM"))},
{Settings::ShaderBackend::SPIRV, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "SPIRV"))},
{Settings::ShaderBackend::Glsl, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLSL"))},
{Settings::ShaderBackend::Glasm, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "GLASM"))},
{Settings::ShaderBackend::SpirV, QStringLiteral(QT_TRANSLATE_NOOP("GMainWindow", "SPIRV"))},
};
// This shouldn't have anything except static initializers (no functions). So

View File

@ -21,7 +21,10 @@
#include <QStyle>
#include <QValidator>
#include <QWidget>
#include <fmt/core.h>
#include "common/assert.h"
#include "common/common_types.h"
#include "common/logging/log.h"
#include "common/settings.h"
#include "yuzu/configuration/configuration_shared.h"
#include "yuzu/configuration/shared_translation.h"

View File

@ -3,6 +3,16 @@
#include "yuzu/uisettings.h"
namespace Settings {
template class Setting<bool>;
template class Setting<std::string>;
template class Setting<u16, true>;
template class Setting<u32>;
template class Setting<u8, true>;
template class Setting<u8>;
template class Setting<unsigned long long>;
} // namespace Settings
namespace UISettings {
const Themes themes{{

View File

@ -17,6 +17,16 @@
using Settings::Category;
using Settings::Setting;
namespace Settings {
extern template class Setting<bool>;
extern template class Setting<std::string>;
extern template class Setting<u16, true>;
extern template class Setting<u32>;
extern template class Setting<u8, true>;
extern template class Setting<u8>;
extern template class Setting<unsigned long long>;
} // namespace Settings
namespace UISettings {
bool IsDarkTheme();