From: Uwe Hermann Date: Sun, 3 Mar 2013 16:20:00 +0000 (+0100) Subject: Minor whitespace fixes. X-Git-Tag: pulseview-0.1.0~115 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9ba4ca3540ace02b1b5439ec2f4584f82f2aca77;p=pulseview.git Minor whitespace fixes. --- diff --git a/pv/prop/binding/binding.cpp b/pv/prop/binding/binding.cpp index 9455ad59..5d411686 100644 --- a/pv/prop/binding/binding.cpp +++ b/pv/prop/binding/binding.cpp @@ -40,7 +40,7 @@ Binding::Binding() : QWidget* Binding::get_form(QWidget *parent) { - if(_form) + if (_form) return _form; _form = new QWidget(parent); diff --git a/pv/prop/enum.cpp b/pv/prop/enum.cpp index 1694840a..a222c70b 100644 --- a/pv/prop/enum.cpp +++ b/pv/prop/enum.cpp @@ -43,11 +43,11 @@ Enum::Enum(QString name, QWidget* Enum::get_widget(QWidget *parent) { - if(_selector) + if (_selector) return _selector; _selector = new QComboBox(parent); - for(vector< pair >::const_iterator i = + for (vector< pair >::const_iterator i = _values.begin(); i != _values.end(); i++) _selector->addItem((*i).second, @@ -60,7 +60,7 @@ void Enum::commit() { assert(_setter); - if(!_selector) + if (!_selector) return; const int index = _selector->currentIndex(); diff --git a/pv/samplingbar.cpp b/pv/samplingbar.cpp index b4067909..e46a3972 100644 --- a/pv/samplingbar.cpp +++ b/pv/samplingbar.cpp @@ -77,7 +77,7 @@ SamplingBar::SamplingBar(QWidget *parent) : _sample_rate_value.setDecimals(0); _sample_rate_value.setSuffix("Hz"); - for(size_t i = 0; i < countof(RecordLengths); i++) + for (size_t i = 0; i < countof(RecordLengths); i++) { const uint64_t &l = RecordLengths[i]; char *const text = sr_si_string_u64(l, " samples"); @@ -85,7 +85,7 @@ SamplingBar::SamplingBar(QWidget *parent) : qVariantFromValue(l)); g_free(text); - if(l == DefaultRecordLength) + if (l == DefaultRecordLength) _record_length_selector.setCurrentIndex(i); } diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 78ba59bc..7bf43594 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -92,7 +92,7 @@ void LogicSignal::paint(QPainter &p, int y, int left, int right, double samplerate = _data->get_samplerate(); // Show sample rate as 1Hz when it is unknown - if(samplerate == 0.0) + if (samplerate == 0.0) samplerate = 1.0; const double pixels_offset = offset / scale; diff --git a/test/data/logicsnapshot.cpp b/test/data/logicsnapshot.cpp index 67321c86..bbc74383 100644 --- a/test/data/logicsnapshot.cpp +++ b/test/data/logicsnapshot.cpp @@ -490,7 +490,7 @@ BOOST_AUTO_TEST_CASE(WideData) logic.length = Length * sizeof(data[0]); logic.data = data; - for(int i = 0; i < Length; i++) + for (int i = 0; i < Length; i++) data[i] = 0x0FF0; LogicSnapshot s(logic); @@ -522,7 +522,7 @@ BOOST_AUTO_TEST_CASE(Sixteen) logic.length = Length * sizeof(data[0]); logic.data = data; - for(int i = 0; i < Length; i++) + for (int i = 0; i < Length; i++) data[i] = 0xFFFE; LogicSnapshot s(logic);