@@ -9,35 +9,35 @@ namespace plg {
99 exception_guard_exceptions () = delete ;
1010
1111 constexpr explicit exception_guard_exceptions (Rollback rollback)
12- : _rollback (std::move(rollback))
13- , _completed (false ) {
12+ : rollback_ (std::move(rollback))
13+ , completed_ (false ) {
1414 }
1515
1616 constexpr exception_guard_exceptions (
1717 exception_guard_exceptions&& other
1818 ) noexcept (std::is_nothrow_move_constructible_v<Rollback>)
19- : _rollback (std::move(other._rollback ))
20- , _completed (other._completed ) {
21- other._completed = true ;
19+ : rollback_ (std::move(other.rollback_ ))
20+ , completed_ (other.completed_ ) {
21+ other.completed_ = true ;
2222 }
2323
2424 exception_guard_exceptions (const exception_guard_exceptions&) = delete ;
2525 exception_guard_exceptions& operator =(const exception_guard_exceptions&) = delete ;
2626 exception_guard_exceptions& operator =(exception_guard_exceptions&&) = delete ;
2727
2828 constexpr void complete () noexcept {
29- _completed = true ;
29+ completed_ = true ;
3030 }
3131
3232 constexpr ~exception_guard_exceptions () {
33- if (!_completed ) {
34- _rollback ();
33+ if (!completed_ ) {
34+ rollback_ ();
3535 }
3636 }
3737
3838 private:
39- PLUGIFY_NO_UNIQUE_ADDRESS Rollback _rollback ;
40- bool _completed ;
39+ PLUGIFY_NO_UNIQUE_ADDRESS Rollback rollback_ ;
40+ bool completed_ ;
4141 };
4242
4343 template <class Rollback >
@@ -53,24 +53,24 @@ namespace plg {
5353 constexpr exception_guard_noexceptions (
5454 exception_guard_noexceptions&& other
5555 ) noexcept (std::is_nothrow_move_constructible_v<Rollback>)
56- : _completed (other._completed ) {
57- other._completed = true ;
56+ : completed_ (other.completed_ ) {
57+ other.completed_ = true ;
5858 }
5959
6060 exception_guard_noexceptions (const exception_guard_noexceptions&) = delete ;
6161 exception_guard_noexceptions& operator =(const exception_guard_noexceptions&) = delete ;
6262 exception_guard_noexceptions& operator =(exception_guard_noexceptions&&) = delete ;
6363
6464 constexpr void complete () noexcept {
65- _completed = true ;
65+ completed_ = true ;
6666 }
6767
6868 constexpr ~exception_guard_noexceptions () {
69- PLUGIFY_ASSERT (_completed , " exception_guard not completed with exceptions disabled" );
69+ PLUGIFY_ASSERT (completed_ , " exception_guard not completed with exceptions disabled" );
7070 }
7171
7272 private:
73- bool _completed = false ;
73+ bool completed_ = false ;
7474 };
7575
7676 template <class Rollback >
@@ -84,15 +84,15 @@ namespace plg {
8484
8585 template <class Func >
8686 class scope_guard {
87- PLUGIFY_NO_UNIQUE_ADDRESS Func _func ;
87+ PLUGIFY_NO_UNIQUE_ADDRESS Func func_ ;
8888
8989 public:
9090 constexpr explicit scope_guard (Func func)
91- : _func (std::move(func)) {
91+ : func_ (std::move(func)) {
9292 }
9393
9494 constexpr ~scope_guard () {
95- _func ();
95+ func_ ();
9696 }
9797
9898 scope_guard (const scope_guard&) = delete ;
0 commit comments