From: Uwe Hermann Date: Wed, 22 Mar 2017 22:34:36 +0000 (+0100) Subject: Consistenty use auto-generated namespace comments. X-Git-Tag: pulseview-0.4.0~121 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=870ea3dbf35b182e120c5d84ab89bf9cb7691232;p=pulseview.git Consistenty use auto-generated namespace comments. This patch was generated using clang-tidy: clang-tidy -checks="-*,google-readability-namespace-comments" -fix Switch to the format used by clang-tidy to allow easy, automatic, tool-based maintenance / checking of the comments. This also found a few instances of comments that were out of sync. --- diff --git a/pv/binding/binding.cpp b/pv/binding/binding.cpp index 79ce90a3..00399c1d 100644 --- a/pv/binding/binding.cpp +++ b/pv/binding/binding.cpp @@ -88,5 +88,5 @@ QString Binding::print_gvariant(Glib::VariantBase gvar) return s; } -} // binding -} // pv +} // namespace binding +} // namespace pv diff --git a/pv/binding/binding.hpp b/pv/binding/binding.hpp index aed8c34c..c4b1e9dd 100644 --- a/pv/binding/binding.hpp +++ b/pv/binding/binding.hpp @@ -64,7 +64,7 @@ protected: vector< shared_ptr > properties_; }; -} // binding -} // pv +} // namespace binding +} // namespace pv #endif // PULSEVIEW_PV_BINDING_BINDING_HPP diff --git a/pv/binding/decoder.cpp b/pv/binding/decoder.cpp index b968ab79..39bff52b 100644 --- a/pv/binding/decoder.cpp +++ b/pv/binding/decoder.cpp @@ -140,5 +140,5 @@ void Decoder::setter(const char *id, Glib::VariantBase value) decoder_stack_->begin_decode(); } -} // binding -} // pv +} // namespace binding +} // namespace pv diff --git a/pv/binding/decoder.hpp b/pv/binding/decoder.hpp index 0e93cffe..044c0f65 100644 --- a/pv/binding/decoder.hpp +++ b/pv/binding/decoder.hpp @@ -59,7 +59,7 @@ private: shared_ptr decoder_; }; -} // binding -} // pv +} // namespace binding +} // namespace pv #endif // PULSEVIEW_PV_BINDING_DECODER_HPP diff --git a/pv/binding/device.cpp b/pv/binding/device.cpp index 845708e5..3ebc9f9f 100644 --- a/pv/binding/device.cpp +++ b/pv/binding/device.cpp @@ -201,5 +201,5 @@ QString Device::print_probe_factor(Glib::VariantBase gvar) return QString("%1x").arg(factor); } -} // binding -} // pv +} // namespace binding +} // namespace pv diff --git a/pv/binding/device.hpp b/pv/binding/device.hpp index cd835f29..4c4d6f44 100644 --- a/pv/binding/device.hpp +++ b/pv/binding/device.hpp @@ -71,7 +71,7 @@ protected: shared_ptr configurable_; }; -} // binding -} // pv +} // namespace binding +} // namespace pv #endif // PULSEVIEW_PV_BINDING_DEVICE_HPP diff --git a/pv/binding/inputoutput.hpp b/pv/binding/inputoutput.hpp index 3c64781f..7aa90a16 100644 --- a/pv/binding/inputoutput.hpp +++ b/pv/binding/inputoutput.hpp @@ -77,7 +77,7 @@ private: map options_; }; -} // binding -} // pv +} // namespace binding +} // namespace pv #endif // PULSEVIEW_PV_BINDING_INPUTOUTPUT_H diff --git a/pv/data/decode/decoder.cpp b/pv/data/decode/decoder.cpp index d3ee3459..d7ec5e11 100644 --- a/pv/data/decode/decoder.cpp +++ b/pv/data/decode/decoder.cpp @@ -145,6 +145,6 @@ srd_decoder_inst* Decoder::create_decoder_inst(srd_session *session) const return decoder_inst; } -} // decode -} // data -} // pv +} // namespace decode +} // namespace data +} // namespace pv diff --git a/pv/data/decode/row.cpp b/pv/data/decode/row.cpp index 43ef91e6..1266b843 100644 --- a/pv/data/decode/row.cpp +++ b/pv/data/decode/row.cpp @@ -66,6 +66,6 @@ bool Row::operator<(const Row &other) const (decoder_ == other.decoder_ && row_ < other.row_); } -} // decode -} // data -} // pv +} // namespace decode +} // namespace data +} // namespace pv diff --git a/pv/data/decode/row.hpp b/pv/data/decode/row.hpp index 81058874..5ddd10d3 100644 --- a/pv/data/decode/row.hpp +++ b/pv/data/decode/row.hpp @@ -51,8 +51,8 @@ private: const srd_decoder_annotation_row *row_; }; -} // decode -} // data -} // pv +} // namespace decode +} // namespace data +} // namespace pv #endif // PULSEVIEW_PV_DATA_DECODE_ROW_HPP diff --git a/pv/data/decode/rowdata.cpp b/pv/data/decode/rowdata.cpp index af1fc449..02859b27 100644 --- a/pv/data/decode/rowdata.cpp +++ b/pv/data/decode/rowdata.cpp @@ -47,6 +47,6 @@ void RowData::push_annotation(const Annotation &a) annotations_.push_back(a); } -} // decode -} // data -} // pv +} // namespace decode +} // namespace data +} // namespace pv diff --git a/pv/data/decode/rowdata.hpp b/pv/data/decode/rowdata.hpp index 21543c5c..3cb69b3e 100644 --- a/pv/data/decode/rowdata.hpp +++ b/pv/data/decode/rowdata.hpp @@ -51,8 +51,8 @@ private: vector annotations_; }; -} -} // data -} // pv +} // namespace decode +} // namespace data +} // namespace pv #endif // PULSEVIEW_PV_DATA_DECODE_ROWDATA_HPP diff --git a/pv/data/segment.hpp b/pv/data/segment.hpp index b46af492..0cc7e6f8 100644 --- a/pv/data/segment.hpp +++ b/pv/data/segment.hpp @@ -40,7 +40,7 @@ struct MaxSize32Single; struct MediumSize32Multi; struct MaxSize32Multi; struct MaxSize32MultiIterated; -} +} // namespace SegmentTest namespace pv { namespace data { diff --git a/pv/dialogs/storeprogress.cpp b/pv/dialogs/storeprogress.cpp index 4ef34045..09b6b0f4 100644 --- a/pv/dialogs/storeprogress.cpp +++ b/pv/dialogs/storeprogress.cpp @@ -94,5 +94,5 @@ void StoreProgress::on_progress_updated() } } -} // dialogs -} // pv +} // namespace dialogs +} // namespace pv diff --git a/pv/dialogs/storeprogress.hpp b/pv/dialogs/storeprogress.hpp index b57ad25e..c4256628 100644 --- a/pv/dialogs/storeprogress.hpp +++ b/pv/dialogs/storeprogress.hpp @@ -65,7 +65,7 @@ private: pv::StoreSession session_; }; -} // dialogs -} // pv +} // namespace dialogs +} // namespace pv #endif // PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index 4a5e396c..9775998f 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -250,5 +250,5 @@ void Channels::disable_all_channels() set_all_channels(false); } -} // popups -} // pv +} // namespace popups +} // namespace pv diff --git a/pv/popups/channels.hpp b/pv/popups/channels.hpp index e525b4ba..3701325b 100644 --- a/pv/popups/channels.hpp +++ b/pv/popups/channels.hpp @@ -103,7 +103,7 @@ private: QSignalMapper check_box_mapper_; }; -} // popups -} // pv +} // namespace popups +} // namespace pv #endif // PULSEVIEW_PV_POPUPS_CHANNELS_HPP diff --git a/pv/prop/bool.cpp b/pv/prop/bool.cpp index 9df12a0f..2773eaae 100644 --- a/pv/prop/bool.cpp +++ b/pv/prop/bool.cpp @@ -78,5 +78,5 @@ void Bool::on_state_changed(int) commit(); } -} // prop -} // pv +} // namespace prop +} // namespace pv diff --git a/pv/prop/bool.hpp b/pv/prop/bool.hpp index 7e24e555..619502de 100644 --- a/pv/prop/bool.hpp +++ b/pv/prop/bool.hpp @@ -48,7 +48,7 @@ private: QCheckBox *check_box_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_BOOL_HPP diff --git a/pv/prop/double.cpp b/pv/prop/double.cpp index eeb13fdd..2e7f1d54 100644 --- a/pv/prop/double.cpp +++ b/pv/prop/double.cpp @@ -92,5 +92,5 @@ void Double::on_value_changed(double) commit(); } -} // prop -} // pv +} // namespace prop +} // namespace pv diff --git a/pv/prop/double.hpp b/pv/prop/double.hpp index 666ece97..863648d8 100644 --- a/pv/prop/double.hpp +++ b/pv/prop/double.hpp @@ -62,7 +62,7 @@ private: QDoubleSpinBox *spin_box_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_DOUBLE_HPP diff --git a/pv/prop/enum.cpp b/pv/prop/enum.cpp index 9e4fcd0e..7a4a7837 100644 --- a/pv/prop/enum.cpp +++ b/pv/prop/enum.cpp @@ -84,5 +84,5 @@ void Enum::on_current_item_changed(int) commit(); } -} // prop -} // pv +} // namespace prop +} // namespace pv diff --git a/pv/prop/enum.hpp b/pv/prop/enum.hpp index b3ce26cc..a397913c 100644 --- a/pv/prop/enum.hpp +++ b/pv/prop/enum.hpp @@ -60,7 +60,7 @@ private: QComboBox *selector_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_ENUM_HPP diff --git a/pv/prop/int.cpp b/pv/prop/int.cpp index ce77b959..415ee866 100644 --- a/pv/prop/int.cpp +++ b/pv/prop/int.cpp @@ -157,5 +157,5 @@ void Int::on_value_changed(int) commit(); } -} // prop -} // pv +} // namespace prop +} // namespace pv diff --git a/pv/prop/int.hpp b/pv/prop/int.hpp index e94f6cbf..fabd8013 100644 --- a/pv/prop/int.hpp +++ b/pv/prop/int.hpp @@ -59,7 +59,7 @@ private: QSpinBox *spin_box_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_INT_HPP diff --git a/pv/prop/property.cpp b/pv/prop/property.cpp index 6ae9894e..9bb99c2e 100644 --- a/pv/prop/property.cpp +++ b/pv/prop/property.cpp @@ -39,5 +39,5 @@ bool Property::labeled_widget() const return false; } -} // prop -} // pv +} // namespace prop +} // namespace pv diff --git a/pv/prop/property.hpp b/pv/prop/property.hpp index 1a7b264d..7e547dec 100644 --- a/pv/prop/property.hpp +++ b/pv/prop/property.hpp @@ -65,7 +65,7 @@ private: QString name_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_PROPERTY_HPP diff --git a/pv/prop/string.cpp b/pv/prop/string.cpp index a488e89a..23c7f913 100644 --- a/pv/prop/string.cpp +++ b/pv/prop/string.cpp @@ -80,5 +80,5 @@ void String::on_text_edited(const QString&) commit(); } -} // prop -} // pv +} // namespace prop +} // namespace pv diff --git a/pv/prop/string.hpp b/pv/prop/string.hpp index 6032cab0..b75b3ae6 100644 --- a/pv/prop/string.hpp +++ b/pv/prop/string.hpp @@ -45,7 +45,7 @@ private: QLineEdit *line_edit_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_STRING_HPP diff --git a/pv/session.hpp b/pv/session.hpp index faf1396d..c27afcb1 100644 --- a/pv/session.hpp +++ b/pv/session.hpp @@ -64,7 +64,7 @@ class Meta; class OutputFormat; class Packet; class Session; -} +} // namespace sigrok namespace pv { diff --git a/pv/storesession.cpp b/pv/storesession.cpp index 8b638de8..a5850060 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -295,4 +295,4 @@ void StoreSession::store_proc(vector< shared_ptr > achannel_li output_stream_.close(); } -} // pv +} // namespace pv diff --git a/pv/storesession.hpp b/pv/storesession.hpp index 941ef327..b6ead66d 100644 --- a/pv/storesession.hpp +++ b/pv/storesession.hpp @@ -116,6 +116,6 @@ private: uint64_t start_sample_, sample_count_; }; -} // pv +} // namespace pv #endif // PULSEVIEW_PV_STORESESSION_HPP diff --git a/pv/views/viewbase.cpp b/pv/views/viewbase.cpp index b1190562..03e135c3 100644 --- a/pv/views/viewbase.cpp +++ b/pv/views/viewbase.cpp @@ -106,5 +106,5 @@ void ViewBase::data_updated() { } -} // namespace view +} // namespace views } // namespace pv diff --git a/pv/widgets/colourbutton.cpp b/pv/widgets/colourbutton.cpp index 06c82c30..ce2ab2a9 100644 --- a/pv/widgets/colourbutton.cpp +++ b/pv/widgets/colourbutton.cpp @@ -102,5 +102,5 @@ void ColourButton::paintEvent(QPaintEvent *event) p.drawRect(r); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/colourbutton.hpp b/pv/widgets/colourbutton.hpp index 820ca17f..9dbb2b27 100644 --- a/pv/widgets/colourbutton.hpp +++ b/pv/widgets/colourbutton.hpp @@ -61,7 +61,7 @@ private: QColor cur_colour_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_COLOURBUTTON_HPP diff --git a/pv/widgets/colourpopup.cpp b/pv/widgets/colourpopup.cpp index 38f3fd76..170385b3 100644 --- a/pv/widgets/colourpopup.cpp +++ b/pv/widgets/colourpopup.cpp @@ -46,5 +46,5 @@ void ColourPopup::colour_selected(int, int) close(); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/colourpopup.hpp b/pv/widgets/colourpopup.hpp index fd4aea41..6e4de20e 100644 --- a/pv/widgets/colourpopup.hpp +++ b/pv/widgets/colourpopup.hpp @@ -48,7 +48,7 @@ private: QVBoxLayout layout_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_COLOURPOPUP_HPP diff --git a/pv/widgets/decodergroupbox.cpp b/pv/widgets/decodergroupbox.cpp index f5b9f253..26805c87 100644 --- a/pv/widgets/decodergroupbox.cpp +++ b/pv/widgets/decodergroupbox.cpp @@ -73,5 +73,5 @@ void DecoderGroupBox::set_decoder_visible(bool visible) ":/icons/decoder-hidden.svg")); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/decodergroupbox.hpp b/pv/widgets/decodergroupbox.hpp index 2371068b..a622d0b2 100644 --- a/pv/widgets/decodergroupbox.hpp +++ b/pv/widgets/decodergroupbox.hpp @@ -50,7 +50,7 @@ private: QPushButton show_hide_button_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_DECODERGROUPBOX_HPP diff --git a/pv/widgets/decodermenu.cpp b/pv/widgets/decodermenu.cpp index 994aad1b..5e545893 100644 --- a/pv/widgets/decodermenu.cpp +++ b/pv/widgets/decodermenu.cpp @@ -68,5 +68,5 @@ void DecoderMenu::on_action(QObject *action) decoder_selected(dec); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/decodermenu.hpp b/pv/widgets/decodermenu.hpp index cec4b574..2fe7cd2b 100644 --- a/pv/widgets/decodermenu.hpp +++ b/pv/widgets/decodermenu.hpp @@ -48,7 +48,7 @@ private: QSignalMapper mapper_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_DECODERMENU_HPP diff --git a/pv/widgets/devicetoolbutton.cpp b/pv/widgets/devicetoolbutton.cpp index 99335ca1..bb18b792 100644 --- a/pv/widgets/devicetoolbutton.cpp +++ b/pv/widgets/devicetoolbutton.cpp @@ -157,5 +157,5 @@ void DeviceToolButton::on_menu_hover_timeout() QToolTip::showText(QCursor::pos(), device_tooltip_); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/devicetoolbutton.hpp b/pv/widgets/devicetoolbutton.hpp index 46b2240a..ee7b12ae 100644 --- a/pv/widgets/devicetoolbutton.hpp +++ b/pv/widgets/devicetoolbutton.hpp @@ -109,7 +109,7 @@ private: QString device_tooltip_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_DEVICETOOLBUTTON_HPP diff --git a/pv/widgets/exportmenu.cpp b/pv/widgets/exportmenu.cpp index 13c977d5..ff82b6aa 100644 --- a/pv/widgets/exportmenu.cpp +++ b/pv/widgets/exportmenu.cpp @@ -95,5 +95,5 @@ void ExportMenu::on_action(QObject *action) format_selected((*iter).second); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/exportmenu.hpp b/pv/widgets/exportmenu.hpp index 0980ffd5..f3f104dd 100644 --- a/pv/widgets/exportmenu.hpp +++ b/pv/widgets/exportmenu.hpp @@ -55,7 +55,7 @@ private: QSignalMapper mapper_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_EXPORTMENU_HPP diff --git a/pv/widgets/importmenu.cpp b/pv/widgets/importmenu.cpp index 145bbb43..1a45aa62 100644 --- a/pv/widgets/importmenu.cpp +++ b/pv/widgets/importmenu.cpp @@ -84,5 +84,5 @@ void ImportMenu::on_action(QObject *action) format_selected((*iter).second); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/importmenu.hpp b/pv/widgets/importmenu.hpp index cb33af98..d1d5231a 100644 --- a/pv/widgets/importmenu.hpp +++ b/pv/widgets/importmenu.hpp @@ -54,7 +54,7 @@ private: QSignalMapper mapper_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_IMPORTMENU_HPP diff --git a/pv/widgets/popuptoolbutton.cpp b/pv/widgets/popuptoolbutton.cpp index 8e443e43..3fc2eb20 100644 --- a/pv/widgets/popuptoolbutton.cpp +++ b/pv/widgets/popuptoolbutton.cpp @@ -53,5 +53,5 @@ void PopupToolButton::on_clicked(bool) popup_->show(); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/popuptoolbutton.hpp b/pv/widgets/popuptoolbutton.hpp index e7bf0032..cc722c80 100644 --- a/pv/widgets/popuptoolbutton.hpp +++ b/pv/widgets/popuptoolbutton.hpp @@ -45,7 +45,7 @@ private: Popup *popup_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_POPUPTOOLBUTTON_HPP diff --git a/pv/widgets/sweeptimingwidget.cpp b/pv/widgets/sweeptimingwidget.cpp index d7686202..ea77c0fe 100644 --- a/pv/widgets/sweeptimingwidget.cpp +++ b/pv/widgets/sweeptimingwidget.cpp @@ -174,5 +174,5 @@ void SweepTimingWidget::set_value(uint64_t value) list_.setCurrentIndex(best_match); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/sweeptimingwidget.hpp b/pv/widgets/sweeptimingwidget.hpp index 28fb9ac6..0b61bf4a 100644 --- a/pv/widgets/sweeptimingwidget.hpp +++ b/pv/widgets/sweeptimingwidget.hpp @@ -68,7 +68,7 @@ private: ValueType value_type_; }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif // PULSEVIEW_PV_WIDGETS_SWEEPTIMINGWIDGET_HPP diff --git a/pv/widgets/timestampspinbox.cpp b/pv/widgets/timestampspinbox.cpp index f5d8d0bf..fd52c504 100644 --- a/pv/widgets/timestampspinbox.cpp +++ b/pv/widgets/timestampspinbox.cpp @@ -116,5 +116,5 @@ void TimestampSpinBox::updateEdit() lineEdit()->setText(newtext); } -} // widgets -} // pv +} // namespace widgets +} // namespace pv diff --git a/pv/widgets/timestampspinbox.hpp b/pv/widgets/timestampspinbox.hpp index 65c041c9..123ef876 100644 --- a/pv/widgets/timestampspinbox.hpp +++ b/pv/widgets/timestampspinbox.hpp @@ -86,7 +86,7 @@ private: void updateEdit(); }; -} // widgets -} // pv +} // namespace widgets +} // namespace pv #endif diff --git a/pv/widgets/wellarray.cpp b/pv/widgets/wellarray.cpp index 76175527..4e3382ba 100644 --- a/pv/widgets/wellarray.cpp +++ b/pv/widgets/wellarray.cpp @@ -292,5 +292,5 @@ void WellArray::keyPressEvent(QKeyEvent* event) } -} // namespace wellarray +} // namespace widgets } // namespace pv diff --git a/pv/widgets/wellarray.hpp b/pv/widgets/wellarray.hpp index 6bed8ee1..35a2f2f6 100644 --- a/pv/widgets/wellarray.hpp +++ b/pv/widgets/wellarray.hpp @@ -135,5 +135,5 @@ private: WellArrayData *d; }; -} // namespace wellarray +} // namespace widgets } // namespace pv diff --git a/test/util.cpp b/test/util.cpp index 0ac6f5fc..163bc7ac 100644 --- a/test/util.cpp +++ b/test/util.cpp @@ -40,7 +40,7 @@ namespace { pv::util::SIPrefix yotta = pv::util::SIPrefix::yotta; /* pv::util::TimeUnit Time = pv::util::TimeUnit::Time; // Not currently used */ -} +} // namespace BOOST_AUTO_TEST_SUITE(UtilTest)