Skip to content

Commit

Permalink
a few C++20 Ranges adoptions left out of 4ccdb6a
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiapoirier committed Jul 24, 2023
1 parent 78ea9c0 commit 4070192
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion exemplar/exemplar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion exemplar/exemplar.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ class PLUGINCORE final : public DfxPluginCore {
dfx::UniqueOpaqueType<rfftw_plan, rfftw_destroy_plan> plan, rplan;

/* result of ffts ( */
float fftr[*std::max_element(buffersizes.cbegin(), buffersizes.cend())] {};
float fftr[*std::ranges::max_element(buffersizes)] {};

};
2 changes: 1 addition & 1 deletion slowft/slowft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion windowingstub/windowingstub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4070192

Please sign in to comment.