From 2ad82c2e40b6865481733913a2c32735602f63c4 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 16 Dec 2015 22:22:01 +0100 Subject: [PATCH] Various minor whitespace and consistency fixes. --- main.cpp | 2 +- pv/binding/binding.cpp | 3 +-- pv/binding/decoder.cpp | 9 +++---- pv/binding/device.cpp | 3 +-- pv/binding/inputoutput.cpp | 3 +-- pv/data/analogsegment.cpp | 20 +++++--------- pv/data/decoderstack.cpp | 24 ++++++----------- pv/data/logicsegment.cpp | 45 ++++++++++++-------------------- pv/data/segment.cpp | 3 +-- pv/devicemanager.cpp | 9 ++++--- pv/devices/device.cpp | 21 ++++++++++----- pv/devices/file.cpp | 9 ++++--- pv/devices/hardwaredevice.cpp | 23 ++++++++++------ pv/devices/inputfile.cpp | 18 ++++++++----- pv/devices/sessionfile.cpp | 9 ++++--- pv/dialogs/connect.cpp | 3 +-- pv/mainwindow.cpp | 14 +++++----- pv/popups/channels.cpp | 22 ++++++---------- pv/prop/int.cpp | 31 ++++++---------------- pv/session.cpp | 37 +++++++++----------------- pv/storesession.cpp | 3 +-- pv/toolbars/mainbar.cpp | 34 +++++++++--------------- pv/util.cpp | 16 ++++-------- pv/view/cursorpair.cpp | 9 ++++--- pv/view/decodetrace.cpp | 28 +++++++------------- pv/view/header.cpp | 3 +-- pv/view/marginwidget.cpp | 3 +-- pv/view/ruler.cpp | 3 +-- pv/view/view.cpp | 12 +++------ pv/view/viewitempaintparams.cpp | 6 +++-- pv/view/viewport.cpp | 7 ++--- pv/view/viewwidget.cpp | 16 ++++-------- pv/widgets/colourbutton.cpp | 4 +-- pv/widgets/decodermenu.cpp | 3 +-- pv/widgets/popup.cpp | 7 ++--- pv/widgets/sweeptimingwidget.cpp | 6 ++--- pv/widgets/timestampspinbox.cpp | 3 +-- 37 files changed, 193 insertions(+), 278 deletions(-) diff --git a/main.cpp b/main.cpp index daec62d2..7ac7ef36 100644 --- a/main.cpp +++ b/main.cpp @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) // Run the application ret = a.exec(); - } catch(std::exception e) { + } catch (std::exception e) { qDebug() << e.what(); } diff --git a/pv/binding/binding.cpp b/pv/binding/binding.cpp index fccb96be..f2a28d39 100644 --- a/pv/binding/binding.cpp +++ b/pv/binding/binding.cpp @@ -49,8 +49,7 @@ void Binding::add_properties_to_form(QFormLayout *layout, { assert(layout); - for (shared_ptr p : properties_) - { + for (shared_ptr p : properties_) { assert(p); QWidget *const widget = p->get_widget(layout->parentWidget(), diff --git a/pv/binding/decoder.cpp b/pv/binding/decoder.cpp index 28cc30d6..7d29e2fd 100644 --- a/pv/binding/decoder.cpp +++ b/pv/binding/decoder.cpp @@ -59,8 +59,7 @@ Decoder::Decoder( const srd_decoder *const dec = decoder_->decoder(); assert(dec); - for (GSList *l = dec->options; l; l = l->next) - { + for (GSList *l = dec->options; l; l = l->next) { const srd_decoder_option *const opt = (srd_decoder_option*)l->data; @@ -116,13 +115,11 @@ Glib::VariantBase Decoder::getter(const char *id) if (iter != options.end()) val = (*iter).second; - else - { + else { assert(decoder_->decoder()); // Get the default value if not - for (GSList *l = decoder_->decoder()->options; l; l = l->next) - { + for (GSList *l = decoder_->decoder()->options; l; l = l->next) { const srd_decoder_option *const opt = (srd_decoder_option*)l->data; if (strcmp(opt->id, id) == 0) { diff --git a/pv/binding/device.cpp b/pv/binding/device.cpp index 6f978893..77c772c0 100644 --- a/pv/binding/device.cpp +++ b/pv/binding/device.cpp @@ -88,8 +88,7 @@ Device::Device(shared_ptr configurable) : config_changed(); }; - switch (key->id()) - { + switch (key->id()) { case SR_CONF_SAMPLERATE: // Sample rate values are not bound because they are shown // in the MainBar diff --git a/pv/binding/inputoutput.cpp b/pv/binding/inputoutput.cpp index 0dc0fc19..30548a82 100644 --- a/pv/binding/inputoutput.cpp +++ b/pv/binding/inputoutput.cpp @@ -61,8 +61,7 @@ namespace binding { InputOutput::InputOutput( const map> &options) { - for (pair> o : options) - { + for (pair> o : options) { const shared_ptr