From: Soeren Apel Date: Mon, 20 Aug 2018 14:01:48 +0000 (+0200) Subject: Replace (double)0 by 0.0 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=a20c1fcc6c86659439a368f4d56c1b60c70dc62c Replace (double)0 by 0.0 --- diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 3ee62f4c..9fcb42d1 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -607,9 +607,9 @@ void MainBar::export_file(shared_ptr format, bool selection_only) const pv::util::Timestamp& end_time = trace_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); if ((start_sample == 0) && (end_sample == 0)) { // Both cursors are negative and were clamped to 0 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))