X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;h=651b8c3d77b27f7797d66285896ab56da69f9959;hp=be7ac04a5847b6591bd808799317ed47ad4600ea;hb=a20c1fcc6c86659439a368f4d56c1b60c70dc62c;hpb=99ba5f2845a24f91901addb80c04d5bf0e0906f3 diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index be7ac04a..651b8c3d 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -1142,9 +1142,9 @@ void DecodeTrace::on_export_row_with_cursor() const pv::util::Timestamp& end_time = view->cursors()->second()->time(); const uint64_t start_sample = (uint64_t)max( - (double)0, start_time.convert_to() * samplerate); + 0.0, start_time.convert_to() * samplerate); const uint64_t end_sample = (uint64_t)max( - (double)0, end_time.convert_to() * samplerate); + 0.0, end_time.convert_to() * samplerate); // Are both cursors negative and thus were clamped to 0? if ((start_sample == 0) && (end_sample == 0)) @@ -1168,9 +1168,9 @@ void DecodeTrace::on_export_all_rows_with_cursor() const pv::util::Timestamp& end_time = view->cursors()->second()->time(); const uint64_t start_sample = (uint64_t)max( - (double)0, start_time.convert_to() * samplerate); + 0.0, start_time.convert_to() * samplerate); const uint64_t end_sample = (uint64_t)max( - (double)0, end_time.convert_to() * samplerate); + 0.0, end_time.convert_to() * samplerate); // Are both cursors negative and thus were clamped to 0? if ((start_sample == 0) && (end_sample == 0))