From 1f1d55ce48ae1dac0f077c60827a41b368b5207a Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 10 Mar 2017 21:41:30 +0100 Subject: [PATCH] Use bool literals for boolean values. This patch was generated using clang-tidy: clang-tidy -checks="-*,modernize-use-bool-literals" -fix --- pv/data/logicsegment.cpp | 4 ++-- pv/view/analogsignal.cpp | 2 +- pv/view/view.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pv/data/logicsegment.cpp b/pv/data/logicsegment.cpp index 1e66e364..bdfc9816 100644 --- a/pv/data/logicsegment.cpp +++ b/pv/data/logicsegment.cpp @@ -376,7 +376,7 @@ void LogicSegment::get_subsampled_edges( // Slide right and zoom out at the beginnings of mip-map // blocks until we encounter a change - while (1) { + while (true) { const int level_scale_power = (level + 1) * MipMapScalePower; const uint64_t offset = @@ -408,7 +408,7 @@ void LogicSegment::get_subsampled_edges( // Zoom in, and slide right until we encounter a change, // and repeat until we reach min_level - while (1) { + while (true) { assert(mip_map_[level].data); const int level_scale_power = diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index 2715a386..399802b5 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -80,7 +80,7 @@ AnalogSignal::AnalogSignal( pos_vdivs_(1), neg_vdivs_(1), resolution_(0), - autoranging_(1) + autoranging_(true) { pv::data::Analog* analog_data = dynamic_cast(data().get()); diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 2bf3d20a..cc0ceb79 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -676,7 +676,7 @@ void View::restack_all_trace_tree_items() o->restack_items(); // Re-assign background colors - bool next_bgcolour_state = 0; + bool next_bgcolour_state = false; for (auto &o : sorted_owners) next_bgcolour_state = o->reassign_bgcolour_states(next_bgcolour_state); -- 2.30.2