From: Uwe Hermann Date: Wed, 22 Mar 2017 22:34:36 +0000 (+0100) Subject: Consistenty use auto-generated namespace comments. X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=870ea3dbf35b182e120c5d84ab89bf9cb7691232 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 79ce90a..00399c1 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 aed8c34..c4b1e9d 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 b968ab7..39bff52 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 0e93cff..044c0f6 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 845708e..3ebc9f9 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 cd835f2..4c4d6f4 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 3c64781..7aa90a1 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 d3ee345..d7ec5e1 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 43ef91e..1266b84 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 8105887..5ddd10d 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 af1fc44..02859b2 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 21543c5..3cb69b3 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 b46af49..0cc7e6f 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 4ef3404..09b6b0f 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 b57ad25..c425662 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 4a5e396..9775998 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 e525b4b..3701325 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 9df12a0..2773eaa 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 7e24e55..619502d 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 eeb13fd..2e7f1d5 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 666ece9..863648d 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 9e4fcd0..7a4a783 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 b3ce26c..a397913 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 ce77b95..415ee86 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 e94f6cb..fabd801 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 6ae9894..9bb99c2 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 1a7b264..7e547de 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 a488e89..23c7f91 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 6032cab..b75b3ae 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 faf1396..c27afcb 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 8b638de..a585006 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 941ef32..b6ead66 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 b119056..03e135c 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 06c82c3..ce2ab2a 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 820ca17..9dbb2b2 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 38f3fd7..170385b 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 fd4aea4..6e4de20 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 f5b9f25..26805c8 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 2371068..a622d0b 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 994aad1..5e54589 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 cec4b57..2fe7cd2 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 99335ca..bb18b79 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 46b2240..ee7b12a 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 13c977d..ff82b6a 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 0980ffd..f3f104d 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 145bbb4..1a45aa6 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 cb33af9..d1d5231 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 8e443e4..3fc2eb2 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 e7bf003..cc722c8 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 d768620..ea77c0f 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 28fb9ac..0b61bf4 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 f5d8d0b..fd52c50 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 65c041c..123ef87 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 7617552..4e3382b 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 6bed8ee..35a2f2f 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 0ac6f5f..163bc7a 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)