use C++ std function for max()
This commit is contained in:
parent
7697ff6b7c
commit
78aa7a13fd
@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "pbd/memento_command.h"
|
||||
#include "pbd/basename.h"
|
||||
@ -1611,11 +1612,6 @@ NoteResizeDrag::aborted (bool)
|
||||
|
||||
#ifdef WITH_VIDEOTIMELINE
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
|
||||
AVDraggingView::AVDraggingView (RegionView* v)
|
||||
: view (v)
|
||||
{
|
||||
@ -1757,8 +1753,8 @@ VideoTimeLineDrag::finished (GdkEvent * /*event*/, bool movement_occurred)
|
||||
}
|
||||
|
||||
_editor->session()->maybe_update_session_range(
|
||||
MAX(ARDOUR_UI::instance()->video_timeline->get_offset(), 0),
|
||||
MAX(ARDOUR_UI::instance()->video_timeline->get_offset() + ARDOUR_UI::instance()->video_timeline->get_duration(), 0)
|
||||
std::max(ARDOUR_UI::instance()->video_timeline->get_offset(), (ARDOUR::frameoffset_t) 0),
|
||||
std::max(ARDOUR_UI::instance()->video_timeline->get_offset() + ARDOUR_UI::instance()->video_timeline->get_duration(), (ARDOUR::frameoffset_t) 0)
|
||||
);
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
#ifdef WITH_VIDEOTIMELINE
|
||||
|
||||
#include <algorithm>
|
||||
#include <sigc++/bind.h>
|
||||
#include "ardour/tempo.h"
|
||||
|
||||
@ -46,10 +47,6 @@ using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Timecode;
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
VideoTimeLine::VideoTimeLine (PublicEditor *ed, ArdourCanvas::Group *vbg, int initial_height)
|
||||
: editor (ed)
|
||||
, videotl_bar_group(vbg)
|
||||
@ -519,8 +516,8 @@ VideoTimeLine::video_file_info (std::string filename, bool local)
|
||||
flush_local_cache ();
|
||||
|
||||
_session->maybe_update_session_range(
|
||||
MAX(get_offset(), 0),
|
||||
MAX(get_offset() + get_duration(), 0)
|
||||
std::max(get_offset(), (ARDOUR::frameoffset_t) 0),
|
||||
std::max(get_offset() + get_duration(), (ARDOUR::frameoffset_t) 0)
|
||||
);
|
||||
|
||||
if (found_xjadeo() && local_file) {
|
||||
|
Loading…
Reference in New Issue
Block a user