]> sigrok.org Git - pulseview.git/commitdiff
Use bool literals for boolean values.
authorUwe Hermann <redacted>
Fri, 10 Mar 2017 20:41:30 +0000 (21:41 +0100)
committerUwe Hermann <redacted>
Sat, 11 Mar 2017 12:06:03 +0000 (13:06 +0100)
This patch was generated using clang-tidy:

  clang-tidy -checks="-*,modernize-use-bool-literals" -fix

pv/data/logicsegment.cpp
pv/view/analogsignal.cpp
pv/view/view.cpp

index 1e66e364c7f6cfe2f71a3f6ea5ae64a1d5b17dc0..bdfc98167b81df85132c2ce2c5310bbe4b62fc52 100644 (file)
@@ -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 =
index 2715a386bdf83a37d64e194063b86b23e8c552d8..399802b5e0f754ca0eebded3393344f52bb2e053 100644 (file)
@@ -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<pv::data::Analog*>(data().get());
index 2bf3d20a4301413a8503aceb9b9d441698334474..cc0ceb79cabfadaa68fa1396997de3ba79930b78 100644 (file)
@@ -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);