Skip to content

Commit

Permalink
fix compiler in C++ 11
Browse files Browse the repository at this point in the history
  • Loading branch information
IronsDu committed Mar 12, 2022
1 parent 6a77f46 commit 7bcf604
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/brynet/base/Timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ class RepeatTimer
public:
using Ptr = std::shared_ptr<RepeatTimer>;

RepeatTimer()
{
mCancel.store(false);
}

void cancel()
{
mCancel.store(true);
Expand All @@ -92,7 +97,7 @@ class RepeatTimer
}

private:
std::atomic_bool mCancel = {false};
std::atomic_bool mCancel;
};

class TimerMgr final : public std::enable_shared_from_this<TimerMgr>
Expand Down

0 comments on commit 7bcf604

Please sign in to comment.