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 3f55ee2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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
4 changes: 2 additions & 2 deletions include/brynet/net/wrapper/ConnectionBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ template<typename Derived>
class BaseConnectionBuilder
{
public:
Derived& WithService(TcpService::Ptr service)
Derived& WithService(ITcpService::Ptr service)
{
mTcpService = std::move(service);
return static_cast<Derived&>(*this);
Expand Down Expand Up @@ -198,7 +198,7 @@ class BaseConnectionBuilder
}

private:
TcpService::Ptr mTcpService;
ITcpService::Ptr mTcpService;
ConnectionOption mOption;
SocketConnectBuilder mConnectBuilder;
};
Expand Down

0 comments on commit 3f55ee2

Please sign in to comment.