using std::max was removed from header
This commit is contained in:
parent
23feb0491e
commit
aa564efa86
|
@ -791,7 +791,7 @@ Editor::set_timecode_ruler_scale (samplepos_t lower, samplepos_t upper)
|
||||||
|
|
||||||
timecode_nmarks = _track_canvas->width() / text_width_rough_guess;
|
timecode_nmarks = _track_canvas->width() / text_width_rough_guess;
|
||||||
timecode_ruler_scale = timecode_show_many_hours;
|
timecode_ruler_scale = timecode_show_many_hours;
|
||||||
timecode_mark_modulo = max ((samplecnt_t) 1, 1 + (hours_in_range / timecode_nmarks));
|
timecode_mark_modulo = std::max ((samplecnt_t) 1, 1 + (hours_in_range / timecode_nmarks));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,14 +974,14 @@ Editor::compute_bbt_ruler_scale (samplepos_t lower, samplepos_t upper)
|
||||||
|
|
||||||
std::vector<TempoMap::BBTPoint>::const_iterator i;
|
std::vector<TempoMap::BBTPoint>::const_iterator i;
|
||||||
Timecode::BBT_Time lower_beat, upper_beat; // the beats at each end of the ruler
|
Timecode::BBT_Time lower_beat, upper_beat; // the beats at each end of the ruler
|
||||||
double floor_lower_beat = floor(max (0.0, _session->tempo_map().beat_at_sample (lower)));
|
double floor_lower_beat = floor(std::max (0.0, _session->tempo_map().beat_at_sample (lower)));
|
||||||
|
|
||||||
if (floor_lower_beat < 0.0) {
|
if (floor_lower_beat < 0.0) {
|
||||||
floor_lower_beat = 0.0;
|
floor_lower_beat = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const samplecnt_t beat_before_lower_pos = _session->tempo_map().sample_at_beat (floor_lower_beat);
|
const samplecnt_t beat_before_lower_pos = _session->tempo_map().sample_at_beat (floor_lower_beat);
|
||||||
const samplecnt_t beat_after_upper_pos = _session->tempo_map().sample_at_beat (floor (max (0.0, _session->tempo_map().beat_at_sample (upper))) + 1.0);
|
const samplecnt_t beat_after_upper_pos = _session->tempo_map().sample_at_beat (floor (std::max (0.0, _session->tempo_map().beat_at_sample (upper))) + 1.0);
|
||||||
|
|
||||||
_session->bbt_time (beat_before_lower_pos, lower_beat);
|
_session->bbt_time (beat_before_lower_pos, lower_beat);
|
||||||
_session->bbt_time (beat_after_upper_pos, upper_beat);
|
_session->bbt_time (beat_after_upper_pos, upper_beat);
|
||||||
|
@ -1064,7 +1064,7 @@ Editor::compute_bbt_ruler_scale (samplepos_t lower, samplepos_t upper)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const double ceil_upper_beat = floor (max (0.0, _session->tempo_map().beat_at_sample (upper))) + 1.0;
|
const double ceil_upper_beat = floor (std::max (0.0, _session->tempo_map().beat_at_sample (upper))) + 1.0;
|
||||||
if (ceil_upper_beat == floor_lower_beat) {
|
if (ceil_upper_beat == floor_lower_beat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1704,7 +1704,7 @@ Editor::set_minsec_ruler_scale (samplepos_t lower, samplepos_t upper)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
minsec_nmarks = _track_canvas->width() / text_width_rough_guess;
|
minsec_nmarks = _track_canvas->width() / text_width_rough_guess;
|
||||||
minsec_mark_modulo = max ((samplecnt_t) 1, 1 + (hours_in_range / minsec_nmarks));
|
minsec_mark_modulo = std::max ((samplecnt_t) 1, 1 + (hours_in_range / minsec_nmarks));
|
||||||
minsec_mark_interval = minsec_mark_modulo * (60 * 60 * fr);
|
minsec_mark_interval = minsec_mark_modulo * (60 * 60 * fr);
|
||||||
minsec_ruler_scale = minsec_show_many_hours;
|
minsec_ruler_scale = minsec_show_many_hours;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,22 +160,22 @@ TempoCurve::set_position (samplepos_t sample, samplepos_t end_sample)
|
||||||
points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (end_sample - sample), y_pos));
|
points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (end_sample - sample), y_pos));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const samplepos_t sample_step = max ((end_sample - sample) / 5, (samplepos_t) 1);
|
const samplepos_t sample_step = std::max ((end_sample - sample) / 5, (samplepos_t) 1);
|
||||||
samplepos_t current_sample = sample;
|
samplepos_t current_sample = sample;
|
||||||
|
|
||||||
while (current_sample < end_sample) {
|
while (current_sample < end_sample) {
|
||||||
const double tempo_at = _tempo.tempo_at_minute (_tempo.minute_at_sample (current_sample)).note_types_per_minute();
|
const double tempo_at = _tempo.tempo_at_minute (_tempo.minute_at_sample (current_sample)).note_types_per_minute();
|
||||||
const double y_pos = max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0);
|
const double y_pos = std::max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0);
|
||||||
|
|
||||||
points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (current_sample - sample), min (y_pos, curve_height)));
|
points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (current_sample - sample), std::min (y_pos, curve_height)));
|
||||||
|
|
||||||
current_sample += sample_step;
|
current_sample += sample_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
const double tempo_at = _tempo.tempo_at_minute (_tempo.minute_at_sample (end_sample)).note_types_per_minute();
|
const double tempo_at = _tempo.tempo_at_minute (_tempo.minute_at_sample (end_sample)).note_types_per_minute();
|
||||||
const double y_pos = max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0);
|
const double y_pos = std::max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0);
|
||||||
|
|
||||||
points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (end_sample - sample), min (y_pos, curve_height)));
|
points->push_back (ArdourCanvas::Duple (editor.sample_to_pixel (end_sample - sample), std::min (y_pos, curve_height)));
|
||||||
}
|
}
|
||||||
|
|
||||||
_curve->set (*points);
|
_curve->set (*points);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user