c++23: Replace Common::ToUnderlying with std::to_underlying
Requires at least GCC 11, Clang 13, MSVC 19.30 (VS2022 17.0), or AppleClang 13.1.6 (XCode 13.3).
This commit is contained in:
38 files changed
+148
-167
No files matched your search
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "DolphinQt/Config/Graphics/EnhancementsWidget.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
@@ -10,7 +12,6 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/EnumUtils.h"
|
||||
|
||||
#include "Core/Config/GraphicsSettings.h"
|
||||
|
||||
@@ -47,14 +48,14 @@ EnhancementsWidget::EnhancementsWidget(GraphicsPane* gfx_pane)
|
||||
});
|
||||
}
|
||||
|
||||
constexpr int ANISO_1x = Common::ToUnderlying(AnisotropicFilteringMode::Force1x);
|
||||
constexpr int ANISO_2X = Common::ToUnderlying(AnisotropicFilteringMode::Force2x);
|
||||
constexpr int ANISO_4X = Common::ToUnderlying(AnisotropicFilteringMode::Force4x);
|
||||
constexpr int ANISO_8X = Common::ToUnderlying(AnisotropicFilteringMode::Force8x);
|
||||
constexpr int ANISO_16X = Common::ToUnderlying(AnisotropicFilteringMode::Force16x);
|
||||
constexpr int FILTERING_DEFAULT = Common::ToUnderlying(TextureFilteringMode::Default);
|
||||
constexpr int FILTERING_NEAREST = Common::ToUnderlying(TextureFilteringMode::Nearest);
|
||||
constexpr int FILTERING_LINEAR = Common::ToUnderlying(TextureFilteringMode::Linear);
|
||||
constexpr int ANISO_1x = std::to_underlying(AnisotropicFilteringMode::Force1x);
|
||||
constexpr int ANISO_2X = std::to_underlying(AnisotropicFilteringMode::Force2x);
|
||||
constexpr int ANISO_4X = std::to_underlying(AnisotropicFilteringMode::Force4x);
|
||||
constexpr int ANISO_8X = std::to_underlying(AnisotropicFilteringMode::Force8x);
|
||||
constexpr int ANISO_16X = std::to_underlying(AnisotropicFilteringMode::Force16x);
|
||||
constexpr int FILTERING_DEFAULT = std::to_underlying(TextureFilteringMode::Default);
|
||||
constexpr int FILTERING_NEAREST = std::to_underlying(TextureFilteringMode::Nearest);
|
||||
constexpr int FILTERING_LINEAR = std::to_underlying(TextureFilteringMode::Linear);
|
||||
|
||||
void EnhancementsWidget::CreateWidgets()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "DolphinQt/Config/SettingsWindow.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
#include <QDialogButtonBox>
|
||||
@@ -14,8 +16,6 @@
|
||||
#include <QTabWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Common/EnumUtils.h"
|
||||
|
||||
#include "DolphinQt/Config/ControllersPane.h"
|
||||
#include "DolphinQt/Config/Graphics/GraphicsPane.h"
|
||||
#include "DolphinQt/MainWindow.h"
|
||||
@@ -206,5 +206,5 @@ SettingsWindow::SettingsWindow(MainWindow* parent) : StackedSettingsWindow{paren
|
||||
|
||||
void SettingsWindow::SelectPane(SettingsWindowPaneIndex index)
|
||||
{
|
||||
ActivatePane(Common::ToUnderlying(index));
|
||||
ActivatePane(std::to_underlying(index));
|
||||
}
|
||||
Reference in new issue
Block a user