From 5f77c73aaafbec8f43f2fe70314978580661c7b2 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Tue, 19 Dec 2017 03:30:38 +0800 Subject: [PATCH] no throw() --- include/nana/gui/programming_interface.hpp | 2 +- include/nana/gui/widgets/combox.hpp | 2 +- include/nana/gui/widgets/group.hpp | 6 +++--- include/nana/gui/widgets/label.hpp | 4 ++-- include/nana/gui/widgets/spinbox.hpp | 2 +- include/nana/gui/widgets/tabbar.hpp | 2 +- include/nana/gui/widgets/textbox.hpp | 2 +- include/nana/gui/widgets/widget.hpp | 8 ++++---- include/nana/paint/graphics.hpp | 2 +- source/gui/programming_interface.cpp | 2 +- source/gui/widgets/combox.cpp | 2 +- source/gui/widgets/group.cpp | 2 +- source/gui/widgets/label.cpp | 4 ++-- source/gui/widgets/spinbox.cpp | 2 +- source/gui/widgets/tabbar.cpp | 2 +- source/gui/widgets/textbox.cpp | 2 +- source/gui/widgets/widget.cpp | 8 ++++---- source/paint/graphics.cpp | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/nana/gui/programming_interface.hpp b/include/nana/gui/programming_interface.hpp index b5d3e8c2..45ca629c 100644 --- a/include/nana/gui/programming_interface.hpp +++ b/include/nana/gui/programming_interface.hpp @@ -80,7 +80,7 @@ namespace API void set_measurer(window, ::nana::dev::widget_content_measurer_interface*); void attach_drawer(widget&, drawer_trigger&); - ::nana::detail::native_string_type window_caption(window) throw(); + ::nana::detail::native_string_type window_caption(window) noexcept; void window_caption(window, ::nana::detail::native_string_type); window create_window(window, bool nested, const rectangle&, const appearance&, widget* attached); diff --git a/include/nana/gui/widgets/combox.hpp b/include/nana/gui/widgets/combox.hpp index fc8e4522..551c65d3 100644 --- a/include/nana/gui/widgets/combox.hpp +++ b/include/nana/gui/widgets/combox.hpp @@ -223,7 +223,7 @@ namespace nana const drawerbase::combox::drawer_impl& _m_impl() const; private: //Overrides widget's virtual functions - native_string_type _m_caption() const throw() override; + native_string_type _m_caption() const noexcept override; void _m_caption(native_string_type&&) override; nana::any * _m_anyobj(std::size_t pos, bool alloc_if_empty) const override; }; diff --git a/include/nana/gui/widgets/group.hpp b/include/nana/gui/widgets/group.hpp index 2e264289..1bc4d963 100644 --- a/include/nana/gui/widgets/group.hpp +++ b/include/nana/gui/widgets/group.hpp @@ -63,8 +63,8 @@ namespace nana{ group& enable_format_caption(bool format); - group& collocate() throw(); - group& div(const char* div_str) throw(); + group& collocate() noexcept; + group& div(const char* div_str) noexcept; field_reference operator[](const char* field); template @@ -78,7 +78,7 @@ namespace nana{ void _m_add_child(const char* field, widget*); void _m_init(); void _m_complete_creation() override; - native_string_type _m_caption() const throw() override; + native_string_type _m_caption() const noexcept override; void _m_caption(native_string_type&&) override; private: std::unique_ptr impl_; diff --git a/include/nana/gui/widgets/label.hpp b/include/nana/gui/widgets/label.hpp index ee26383b..09d990e4 100644 --- a/include/nana/gui/widgets/label.hpp +++ b/include/nana/gui/widgets/label.hpp @@ -62,12 +62,12 @@ namespace nana label(window parent, const char* text, bool visible = true) :label(parent, std::string(text),visible) {}; label(window, const rectangle& = {}, bool visible = true); label& transparent(bool); ///< Switchs the label widget to the transparent background mode. - bool transparent() const throw(); + bool transparent() const noexcept; label& format(bool); ///< Switches the format mode of the widget. label& add_format_listener(std::function); /// as same as the HTML "for" attribute of a label - label& click_for(window associated_window) throw(); + label& click_for(window associated_window) noexcept; /// Returns the size of the text. If *allowed_width_in_pixel* is not zero, returns a /// "corrected" size that changes lines to fit the text into the specified width diff --git a/include/nana/gui/widgets/spinbox.hpp b/include/nana/gui/widgets/spinbox.hpp index 15cbc694..7815250c 100644 --- a/include/nana/gui/widgets/spinbox.hpp +++ b/include/nana/gui/widgets/spinbox.hpp @@ -113,7 +113,7 @@ namespace nana void modifier(std::string prefix_utf8, std::string suffix_utf8); void modifier(const std::wstring & prefix, const std::wstring& suffix); private: - native_string_type _m_caption() const throw(); + native_string_type _m_caption() const noexcept; void _m_caption(native_string_type&&); }; //end class spinbox }//end namespace nana diff --git a/include/nana/gui/widgets/tabbar.hpp b/include/nana/gui/widgets/tabbar.hpp index 0e2e2e9c..1c492fae 100644 --- a/include/nana/gui/widgets/tabbar.hpp +++ b/include/nana/gui/widgets/tabbar.hpp @@ -384,7 +384,7 @@ namespace nana driver(); ~driver(); - model* get_model() const throw(); + model* get_model() const noexcept; private: //Overrides drawer_trigger's method void attached(widget_reference, graph_reference) override; diff --git a/include/nana/gui/widgets/textbox.hpp b/include/nana/gui/widgets/textbox.hpp index 5f6dbc91..ed8d6c91 100644 --- a/include/nana/gui/widgets/textbox.hpp +++ b/include/nana/gui/widgets/textbox.hpp @@ -276,7 +276,7 @@ namespace nana std::size_t text_line_count() const noexcept; protected: //Overrides widget's virtual functions - native_string_type _m_caption() const throw() override; + native_string_type _m_caption() const noexcept override; void _m_caption(native_string_type&&) override; void _m_typeface(const paint::font&) override; }; diff --git a/include/nana/gui/widgets/widget.hpp b/include/nana/gui/widgets/widget.hpp index 0ee37703..c4834cbf 100644 --- a/include/nana/gui/widgets/widget.hpp +++ b/include/nana/gui/widgets/widget.hpp @@ -54,9 +54,9 @@ namespace nana window parent() const; - ::std::string caption() const throw(); - ::std::wstring caption_wstring() const throw(); - native_string_type caption_native() const throw(); + ::std::string caption() const noexcept; + ::std::wstring caption_wstring() const noexcept; + native_string_type caption_native() const noexcept; widget& caption(std::string utf8); widget& caption(std::wstring); @@ -130,7 +130,7 @@ namespace nana virtual void _m_complete_creation(); virtual general_events& _m_get_general_events() const = 0; - virtual native_string_type _m_caption() const throw(); + virtual native_string_type _m_caption() const noexcept; virtual void _m_caption(native_string_type&&); virtual nana::cursor _m_cursor() const; virtual void _m_cursor(nana::cursor); diff --git a/include/nana/paint/graphics.hpp b/include/nana/paint/graphics.hpp index 9ce35704..800b88c5 100644 --- a/include/nana/paint/graphics.hpp +++ b/include/nana/paint/graphics.hpp @@ -149,7 +149,7 @@ namespace nana /// Saves images as a windows bitmap file /// @param file_utf8 A UTF-8 string to a filename - void save_as_file(const char* file_utf8) const throw(); + void save_as_file(const char* file_utf8) const noexcept; ::nana::color palette(bool for_text) const; graphics& palette(bool for_text, const ::nana::color&); diff --git a/source/gui/programming_interface.cpp b/source/gui/programming_interface.cpp index 22e22cac..1e1fdddd 100644 --- a/source/gui/programming_interface.cpp +++ b/source/gui/programming_interface.cpp @@ -242,7 +242,7 @@ namespace API } } - ::nana::detail::native_string_type window_caption(window wd) throw() + ::nana::detail::native_string_type window_caption(window wd) noexcept { auto const iwd = reinterpret_cast(wd); internal_scope_guard isg; diff --git a/source/gui/widgets/combox.cpp b/source/gui/widgets/combox.cpp index c9b6311d..812c6d44 100644 --- a/source/gui/widgets/combox.cpp +++ b/source/gui/widgets/combox.cpp @@ -1037,7 +1037,7 @@ namespace nana API::refresh_window(*this); } - auto combox::_m_caption() const throw() -> native_string_type + auto combox::_m_caption() const noexcept -> native_string_type { internal_scope_guard lock; auto editor = _m_impl().editor(); diff --git a/source/gui/widgets/group.cpp b/source/gui/widgets/group.cpp index ab8e9e73..63458f8b 100644 --- a/source/gui/widgets/group.cpp +++ b/source/gui/widgets/group.cpp @@ -239,7 +239,7 @@ namespace nana{ _m_init(); } - auto group::_m_caption() const throw() -> native_string_type + auto group::_m_caption() const noexcept -> native_string_type { return impl_->caption.caption_native(); } diff --git a/source/gui/widgets/label.cpp b/source/gui/widgets/label.cpp index 1d436f68..300d0fcc 100644 --- a/source/gui/widgets/label.cpp +++ b/source/gui/widgets/label.cpp @@ -825,7 +825,7 @@ namespace nana return *this; } - bool label::transparent() const throw() + bool label::transparent() const noexcept { return API::is_transparent_background(*this); } @@ -849,7 +849,7 @@ namespace nana return *this; } - label& label::click_for(window associated_window) throw() + label& label::click_for(window associated_window) noexcept { get_drawer_trigger().impl()->for_associated_wd = associated_window; return *this; diff --git a/source/gui/widgets/spinbox.cpp b/source/gui/widgets/spinbox.cpp index 5bf2b342..5a62b10a 100644 --- a/source/gui/widgets/spinbox.cpp +++ b/source/gui/widgets/spinbox.cpp @@ -764,7 +764,7 @@ namespace nana modifier(to_utf8(prefix), to_utf8(suffix)); } - auto spinbox::_m_caption() const throw() -> native_string_type + auto spinbox::_m_caption() const noexcept -> native_string_type { internal_scope_guard lock; auto editor = get_drawer_trigger().impl()->editor(); diff --git a/source/gui/widgets/tabbar.cpp b/source/gui/widgets/tabbar.cpp index ad614c09..2337f468 100644 --- a/source/gui/widgets/tabbar.cpp +++ b/source/gui/widgets/tabbar.cpp @@ -1533,7 +1533,7 @@ namespace nana delete model_; } - model* driver::get_model() const throw() + model* driver::get_model() const noexcept { return model_; } diff --git a/source/gui/widgets/textbox.cpp b/source/gui/widgets/textbox.cpp index de6e2dd9..96c927f3 100644 --- a/source/gui/widgets/textbox.cpp +++ b/source/gui/widgets/textbox.cpp @@ -785,7 +785,7 @@ namespace drawerbase { } //Override _m_caption for caption() - auto textbox::_m_caption() const throw() -> native_string_type + auto textbox::_m_caption() const noexcept -> native_string_type { internal_scope_guard lock; auto editor = get_drawer_trigger().editor(); diff --git a/source/gui/widgets/widget.cpp b/source/gui/widgets/widget.cpp index 183768ab..bcc239ad 100644 --- a/source/gui/widgets/widget.cpp +++ b/source/gui/widgets/widget.cpp @@ -54,12 +54,12 @@ namespace nana widget& wdg_; }; - std::string widget::caption() const throw() + std::string widget::caption() const noexcept { return to_utf8(_m_caption()); } - std::wstring widget::caption_wstring() const throw() + std::wstring widget::caption_wstring() const noexcept { #if defined(NANA_WINDOWS) return _m_caption(); @@ -68,7 +68,7 @@ namespace nana #endif } - auto widget::caption_native() const throw() -> native_string_type + auto widget::caption_native() const noexcept -> native_string_type { return _m_caption(); } @@ -282,7 +282,7 @@ namespace nana void widget::_m_complete_creation() {} - auto widget::_m_caption() const throw() -> native_string_type + auto widget::_m_caption() const noexcept -> native_string_type { return API::dev::window_caption(handle()); } diff --git a/source/paint/graphics.cpp b/source/paint/graphics.cpp index 62f74016..49857d2e 100644 --- a/source/paint/graphics.cpp +++ b/source/paint/graphics.cpp @@ -934,7 +934,7 @@ namespace paint impl_->size.width = impl_->size.height = 0; } - void graphics::save_as_file(const char* file_utf8) const throw() + void graphics::save_as_file(const char* file_utf8) const noexcept { if(impl_->handle) {