Remove using std::min/max from header

This commit is contained in:
Robin Gareus 2020-06-18 00:48:58 +02:00
parent c424e4d61c
commit 23feb0491e
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
6 changed files with 9 additions and 12 deletions

View file

@ -444,7 +444,7 @@ ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &parent, FileSpec const & new_c
samplecnt_t sb = config.format->silence_beginning_at (parent.timespan->get_start(), sample_rate);
samplecnt_t se = config.format->silence_end_at (parent.timespan->get_end(), sample_rate);
samplecnt_t duration = parent.timespan->get_length () + sb + se;
max_samples = min ((samplecnt_t) 8192 * channels, max ((samplecnt_t) 4096 * channels, max_samples));
max_samples = std::min ((samplecnt_t) 8192 * channels, std::max ((samplecnt_t) 4096 * channels, max_samples));
chunker.reset (new Chunker<Sample> (max_samples));
analyser.reset (new Analyser (config.format->sample_rate(), channels, max_samples,
(samplecnt_t) ceil (duration * config.format->sample_rate () / (double) sample_rate)));

View file

@ -502,7 +502,7 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
} else if (possible_out < -2) {
/* variable number of outputs up to -N,
* invalid if in == -2 but we accept it anyway */
FOUNDCFG (min (-possible_out, preferred_out));
FOUNDCFG (std::min (-possible_out, preferred_out));
UPTO (-possible_out)
} else {
/* exact number of outputs */
@ -518,7 +518,7 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
desired_in = possible_in;
} else {
/* configuration can match up to -possible_in */
desired_in = min (-possible_in, audio_in);
desired_in = std::min (-possible_in, audio_in);
}
if (!imprecise && audio_in != desired_in) {
/* skip that configuration, it cannot match
@ -534,7 +534,7 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
/* variable number of outputs up to -N
* not specified if in > 0, but we accept it anyway.
* Really imprecise only if desired_in != audio_in */
FOUNDCFG_IMPRECISE (desired_in, min (-possible_out, preferred_out));
FOUNDCFG_IMPRECISE (desired_in, std::min (-possible_out, preferred_out));
UPTO (-possible_out)
} else {
/* exact number of outputs

View file

@ -34,9 +34,6 @@
#include "pbd/statefuldestructible.h"
using std::min;
using std::max;
class XMLNode;
namespace PBD {

View file

@ -958,13 +958,13 @@ LaunchControlXL::button_track_mode(TrackMode state)
void
LaunchControlXL::button_select_left()
{
switch_bank (max (0, bank_start - (7 + (fader8master() ? 0 : 1))));
switch_bank (std::max (0, bank_start - (7 + (fader8master() ? 0 : 1))));
}
void
LaunchControlXL::button_select_right()
{
switch_bank (max (0, bank_start + 7 + (fader8master() ? 0 : 1)));
switch_bank (std::max (0, bank_start + 7 + (fader8master() ? 0 : 1)));
}
void

View file

@ -682,7 +682,7 @@ Push2::button_octave_down ()
return;
}
int os = (max (-4, octave_shift - 1));
int os = (std::max (-4, octave_shift - 1));
if (os != octave_shift) {
octave_shift = os;
}
@ -696,7 +696,7 @@ Push2::button_octave_up ()
return;
}
int os = (min (4, octave_shift + 1));
int os = (std::min (4, octave_shift + 1));
if (os != octave_shift) {
octave_shift = os;
}

View file

@ -32,7 +32,7 @@ ArdourTransport::tempo () const
void
ArdourTransport::set_tempo (double bpm)
{
bpm = max (0.01, bpm);
bpm = std::max (0.01, bpm);
TempoMap& tempo_map = session ().tempo_map ();
Tempo tempo (bpm, tempo_map.tempo_at_sample (0).note_type (), bpm);
tempo_map.add_tempo (tempo, 0.0, 0, AudioTime);