]> sigrok.org Git - pulseview.git/commitdiff
Replace (double)0 by 0.0
authorSoeren Apel <redacted>
Mon, 20 Aug 2018 14:01:48 +0000 (16:01 +0200)
committerUwe Hermann <redacted>
Tue, 21 Aug 2018 10:02:38 +0000 (12:02 +0200)
pv/toolbars/mainbar.cpp
pv/views/trace/decodetrace.cpp

index 3ee62f4c3dabbd519ced10b1f26c4f410bb2742e..9fcb42d123ec4a64af1da0d18cc1898d6a21d0e9 100644 (file)
@@ -607,9 +607,9 @@ void MainBar::export_file(shared_ptr<OutputFormat> 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<double>() * samplerate);
+                       0.0, start_time.convert_to<double>() * samplerate);
                const uint64_t end_sample = (uint64_t)max(
-                       (double)0, end_time.convert_to<double>() * samplerate);
+                       0.0, end_time.convert_to<double>() * samplerate);
 
                if ((start_sample == 0) && (end_sample == 0)) {
                        // Both cursors are negative and were clamped to 0
index be7ac04a5847b6591bd808799317ed47ad4600ea..651b8c3d77b27f7797d66285896ab56da69f9959 100644 (file)
@@ -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<double>() * samplerate);
+               0.0, start_time.convert_to<double>() * samplerate);
        const uint64_t end_sample = (uint64_t)max(
-               (double)0, end_time.convert_to<double>() * samplerate);
+               0.0, end_time.convert_to<double>() * 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<double>() * samplerate);
+               0.0, start_time.convert_to<double>() * samplerate);
        const uint64_t end_sample = (uint64_t)max(
-               (double)0, end_time.convert_to<double>() * samplerate);
+               0.0, end_time.convert_to<double>() * samplerate);
 
        // Are both cursors negative and thus were clamped to 0?
        if ((start_sample == 0) && (end_sample == 0))