Skip to content

Commit 23641ae

Browse files
committed
using auto
1 parent b2a9115 commit 23641ae

File tree

1 file changed

+5
-5
lines changed
  • examples/xtd.core.examples/delegates/event/src

1 file changed

+5
-5
lines changed

examples/xtd.core.examples/delegates/event/src/event.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class control : public xtd::object {
99
public:
1010
control() = default;
1111

12-
const xtd::string& text() const {return text_;}
13-
void text(const xtd::string& text) {
12+
auto text() const -> const xtd::string& {return text_;}
13+
auto text(const xtd::string& text) -> void {
1414
if (text_ != text) {
1515
text_ = text;
1616
on_text_changed(xtd::event_args::empty);
@@ -20,7 +20,7 @@ class control : public xtd::object {
2020
xtd::event<control, xtd::event_handler> text_changed;
2121

2222
protected:
23-
void on_text_changed(const xtd::event_args& e) {text_changed(*this, e);}
23+
auto on_text_changed(const xtd::event_args& e) -> void {text_changed(*this, e);}
2424

2525
private:
2626
xtd::string text_;
@@ -32,10 +32,10 @@ class button : public control {
3232

3333
xtd::event<button, xtd::event_handler> click;
3434

35-
void perform_click() {on_click(xtd::event_args::empty);}
35+
auto perform_click() -> void {on_click(xtd::event_args::empty);}
3636

3737
protected:
38-
virtual void on_click(const xtd::event_args& e) {click(*this, e);}
38+
virtual auto on_click(const xtd::event_args& e) -> void {click(*this, e);}
3939
};
4040

4141
auto main() -> int {

0 commit comments

Comments
 (0)