diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 9881708a27..d3e7caacdf 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -655,12 +655,12 @@ std::string GetEscapedHtml(std::string html) void ToLower(std::string* str) { - std::transform(str->begin(), str->end(), str->begin(), [](char c) { return Common::ToLower(c); }); + std::ranges::transform(*str, str->begin(), static_cast(Common::ToLower)); } void ToUpper(std::string* str) { - std::transform(str->begin(), str->end(), str->begin(), [](char c) { return Common::ToUpper(c); }); + std::ranges::transform(*str, str->begin(), static_cast(Common::ToUpper)); } bool CaseInsensitiveEquals(std::string_view a, std::string_view b) diff --git a/Source/Core/Core/HW/WiimoteEmu/Camera.cpp b/Source/Core/Core/HW/WiimoteEmu/Camera.cpp index 7b68ab9d5f..1dcdb77952 100644 --- a/Source/Core/Core/HW/WiimoteEmu/Camera.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/Camera.cpp @@ -70,7 +70,7 @@ CameraLogic::GetCameraPoints(const Common::Matrix44& transform, Common::Vec2 fie std::array camera_points; - std::transform(leds.begin(), leds.end(), camera_points.begin(), [&](const Vec3& v) { + std::ranges::transform(leds, camera_points.begin(), [&](const Vec3& v) { const auto point = camera_view * Vec4(v, 1.0); // Check if LED is behind camera. diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index 1fc0caea71..e52fb69200 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -130,8 +130,7 @@ void InterfacePane::CreateUI() Common::DoFileSearch({File::GetUserPath(D_THEMES_IDX), File::GetSysDirectory() + THEMES_DIR}); std::vector theme_names; theme_names.reserve(theme_paths.size()); - std::transform(theme_paths.cbegin(), theme_paths.cend(), std::back_inserter(theme_names), - PathToFileName); + std::ranges::transform(theme_paths, std::back_inserter(theme_names), PathToFileName); // Theme Combobox m_combobox_theme = new ConfigStringChoice(theme_names, Config::MAIN_THEME_NAME); diff --git a/Source/Core/DolphinQt/ToolBar.cpp b/Source/Core/DolphinQt/ToolBar.cpp index 74a31dcfde..9649af6b00 100644 --- a/Source/Core/DolphinQt/ToolBar.cpp +++ b/Source/Core/DolphinQt/ToolBar.cpp @@ -143,8 +143,8 @@ void ToolBar::MakeActions() } std::vector widths; - std::transform(items.begin(), items.end(), std::back_inserter(widths), - [](QWidget* item) { return item->sizeHint().width(); }); + std::ranges::transform(items, std::back_inserter(widths), + [](QWidget* item) { return item->sizeHint().width(); }); const int min_width = *std::max_element(widths.begin(), widths.end()) * 0.85; for (QWidget* widget : items)