From: Joel Holdsworth Date: Sat, 13 Oct 2012 21:14:36 +0000 (+0100) Subject: Removed uneeded statements from LogicDataSnapshot X-Git-Tag: pulseview-0.1.0~252 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=f82670ace2243d3d9004833995cf1030accd8e35 Removed uneeded statements from LogicDataSnapshot --- diff --git a/pv/logicdatasnapshot.cpp b/pv/logicdatasnapshot.cpp index b78047d7..1799c2f4 100644 --- a/pv/logicdatasnapshot.cpp +++ b/pv/logicdatasnapshot.cpp @@ -206,8 +206,7 @@ void LogicDataSnapshot::get_subsampled_edges( const uint64_t final_index = min(end, pow2_ceil(index, MipMapScalePower)); - for(index; - index < final_index && + for(; index < final_index && (index & ~(~0 << MipMapScalePower)) != 0; index++) { @@ -312,7 +311,7 @@ void LogicDataSnapshot::get_subsampled_edges( // do a linear search for the next transition within the // block if(min_length < MipMapScaleFactor) { - for(index; index < end; index++) { + for(; index < end; index++) { const bool sample = (get_sample(index) & sig_mask) != 0; if(sample != last_sample)