From 407019240e5dc711e2a3bb07c1f66c06c90d6b3e Mon Sep 17 00:00:00 2001 From: Sophia Poirier <2997196+sophiapoirier@users.noreply.github.com> Date: Sun, 23 Jul 2023 19:05:38 -0700 Subject: [PATCH] a few C++20 Ranges adoptions left out of 4ccdb6a3f --- exemplar/exemplar.cpp | 2 +- exemplar/exemplar.h | 2 +- slowft/slowft.cpp | 2 +- windowingstub/windowingstub.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exemplar/exemplar.cpp b/exemplar/exemplar.cpp index cf8b48c5..00cfdc96 100644 --- a/exemplar/exemplar.cpp +++ b/exemplar/exemplar.cpp @@ -99,7 +99,7 @@ PLUGIN::PLUGIN(TARGET_API_BASE_INSTANCE_TYPE inInstance) PLUGINCORE::PLUGINCORE(DfxPlugin& inInstance) : DfxPluginCore(inInstance) { /* determine the size of the largest window size */ - constexpr auto maxframe = *std::max_element(buffersizes.cbegin(), buffersizes.cend()); + constexpr auto maxframe = *std::ranges::max_element(buffersizes); /* add some leeway? */ in0.assign(maxframe, 0.f); diff --git a/exemplar/exemplar.h b/exemplar/exemplar.h index 80329418..e796b445 100644 --- a/exemplar/exemplar.h +++ b/exemplar/exemplar.h @@ -159,6 +159,6 @@ class PLUGINCORE final : public DfxPluginCore { dfx::UniqueOpaqueType plan, rplan; /* result of ffts ( */ - float fftr[*std::max_element(buffersizes.cbegin(), buffersizes.cend())] {}; + float fftr[*std::ranges::max_element(buffersizes)] {}; }; diff --git a/slowft/slowft.cpp b/slowft/slowft.cpp index 232fea69..14201827 100644 --- a/slowft/slowft.cpp +++ b/slowft/slowft.cpp @@ -76,7 +76,7 @@ PLUGIN::PLUGIN(TARGET_API_BASE_INSTANCE_TYPE inInstance) PLUGINCORE::PLUGINCORE(DfxPlugin& inInstance) : DfxPluginCore(inInstance) { /* determine the size of the largest window size */ - constexpr auto maxframe = *std::max_element(buffersizes.cbegin(), buffersizes.cend()); + constexpr auto maxframe = *std::ranges::max_element(buffersizes); /* add some leeway? */ in0.assign(maxframe, 0.f); diff --git a/windowingstub/windowingstub.cpp b/windowingstub/windowingstub.cpp index e230ebd3..11acff2a 100644 --- a/windowingstub/windowingstub.cpp +++ b/windowingstub/windowingstub.cpp @@ -79,7 +79,7 @@ PLUGIN::PLUGIN(TARGET_API_BASE_INSTANCE_TYPE inInstance) PLUGINCORE::PLUGINCORE(DfxPlugin& inInstance) : DfxPluginCore(inInstance) { /* determine the size of the largest window size */ - constexpr auto maxframe = *std::max_element(buffersizes.cbegin(), buffersizes.cend()); + constexpr auto maxframe = *std::ranges::max_element(buffersizes); /* add some leeway? */ in0.assign(maxframe, 0.f);