From: Uwe Hermann Date: Sat, 29 Nov 2014 12:15:57 +0000 (+0100) Subject: Minor whitespace fixes. X-Git-Tag: pulseview-0.3.0~421 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=360ab9be5d6060d05cd7d40f5a50f7eafb787290;p=pulseview.git Minor whitespace fixes. --- diff --git a/android/loghandler.cpp b/android/loghandler.cpp index 8e7806c8..0b99b049 100644 --- a/android/loghandler.cpp +++ b/android/loghandler.cpp @@ -101,4 +101,3 @@ void AndroidLogHandler::install_callbacks() } } // namespace pv - diff --git a/extdef.h b/extdef.h index 8af615c0..0e928657 100644 --- a/extdef.h +++ b/extdef.h @@ -21,7 +21,7 @@ #ifndef PULSEVIEW_EXTDEF_H #define PULSEVIEW_EXTDEF_H -#define countof(x) (sizeof(x)/sizeof(x[0])) +#define countof(x) (sizeof(x) / sizeof(x[0])) #define begin_element(x) (&x[0]) #define end_element(x) (&x[countof(x)]) diff --git a/main.cpp b/main.cpp index 8fac9234..74d13fdc 100644 --- a/main.cpp +++ b/main.cpp @@ -154,7 +154,7 @@ int main(int argc, char *argv[]) QObject::connect(handler, SIGNAL(term_received()), &w, SLOT(close())); - } else { + } else { qWarning() << "Could not prepare signal handler."; } diff --git a/pv/data/decode/decoder.hpp b/pv/data/decode/decoder.hpp index fbe59059..aa79e01c 100644 --- a/pv/data/decode/decoder.hpp +++ b/pv/data/decode/decoder.hpp @@ -70,7 +70,7 @@ public: srd_decoder_inst* create_decoder_inst( srd_session *session, int unit_size) const; - std::set< std::shared_ptr > get_data(); + std::set< std::shared_ptr > get_data(); private: const srd_decoder *const decoder_; diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index da831e3b..1c470160 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -392,7 +392,7 @@ void DecoderStack::annotation_callback(srd_proto_data *pdata, void *decoder) assert(decc); auto row_iter = d->rows_.end(); - + // Try looking up the sub-row of this class const auto r = d->class_rows_.find(make_pair(decc, a.format())); if (r != d->class_rows_.end()) diff --git a/pv/prop/binding/deviceoptions.cpp b/pv/prop/binding/deviceoptions.cpp index 68e3237f..8412104d 100644 --- a/pv/prop/binding/deviceoptions.cpp +++ b/pv/prop/binding/deviceoptions.cpp @@ -186,4 +186,3 @@ QString DeviceOptions::print_voltage_threshold(Glib::VariantBase gvar) } // binding } // prop } // pv - diff --git a/pv/widgets/popup.cpp b/pv/widgets/popup.cpp index 7143c24a..68f79f0f 100644 --- a/pv/widgets/popup.cpp +++ b/pv/widgets/popup.cpp @@ -146,7 +146,7 @@ QPolygon Popup::arrow_polygon() const const int l = ArrowLength + ArrowOverlap; switch (pos_) - { + { case Right: poly << QPoint(p.x() + l, p.y() - l); break; @@ -155,7 +155,7 @@ QPolygon Popup::arrow_polygon() const poly << QPoint(p.x() - l, p.y() + l); break; - case Left: + case Left: case Top: poly << QPoint(p.x() - l, p.y() - l); break; @@ -164,13 +164,13 @@ QPolygon Popup::arrow_polygon() const poly << p; switch (pos_) - { + { case Right: case Bottom: poly << QPoint(p.x() + l, p.y() + l); break; - case Left: + case Left: poly << QPoint(p.x() - l, p.y() + l); break; @@ -311,4 +311,3 @@ void Popup::showEvent(QShowEvent*) } // namespace widgets } // namespace pv - diff --git a/signalhandler.cpp b/signalhandler.cpp index 66acc1fd..71f66f55 100644 --- a/signalhandler.cpp +++ b/signalhandler.cpp @@ -66,8 +66,7 @@ void SignalHandler::on_socket_notifier_activated() socket_notifier_->setEnabled(false); int sig_number; - if(read(sockets_[1], &sig_number, sizeof(int)) != - sizeof(int)) { + if(read(sockets_[1], &sig_number, sizeof(int)) != sizeof(int)) { qDebug() << "Failed to catch signal"; abort(); } @@ -87,8 +86,7 @@ void SignalHandler::on_socket_notifier_activated() void SignalHandler::handle_signals(int sig_number) { - if(write(sockets_[0], &sig_number, sizeof(int)) != - sizeof(int)) { + if(write(sockets_[0], &sig_number, sizeof(int)) != sizeof(int)) { // Failed to handle signal abort(); }