Skip to content

Commit

Permalink
Add default constructor for OnEndScope
Browse files Browse the repository at this point in the history
  • Loading branch information
adepierre committed Aug 5, 2023
1 parent c0af51c commit 4f3321c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion botcraft/include/botcraft/Utilities/MiscUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Botcraft::Utilities
class OnEndScope
{
public:
OnEndScope(const std::function<void()>& f) : callback(f) {}
OnEndScope(const std::function<void()>& f = []() {}) : callback(f) {}
~OnEndScope() { callback(); }

// No copy
Expand Down

0 comments on commit 4f3321c

Please sign in to comment.