From c2e774e99d4eb95a89a4839772133f0e60f96064 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 12 May 2020 10:09:23 -0600 Subject: [PATCH] trivial reorder of variable assigment --- libs/ardour/disk_reader.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 2b62867162..61cced8951 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -576,19 +576,18 @@ DiskReader::set_pending_overwrite (OverwriteReason why) const samplecnt_t reserved_size = c->front ()->rbuf->reserved_size (); const samplecnt_t bufsize = c->front ()->rbuf->bufsize (); - overwrite_sample = playback_sample - reserved_size; - overwrite_offset = c->front ()->rbuf->read_ptr (); + overwrite_sample = playback_sample - reserved_size; if (overwrite_offset > reserved_size) { /* * |----------------------------------------------------------------------| - * ^ ^ - * RRRRRRRRRRRRRRRRoverwrite_offset (old read_ptr) - * |<- second ->|<------------------ first chunk ------------------------>| + * ^ ^ + * RRRRRRRRRRRRRRRRoverwrite_offset (old read_ptr) + * |<- second ->|<------------------ first chunk ------------------------>| * * Fill the the end of the buffer ("first chunk"), above - */ + */ overwrite_offset -= reserved_size;