Loading src/event/epoll.cpp +2 −4 Changes for src/event/epoll.cpp: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -378,10 +378,8 @@ namespace netplus { }; void event::CreateConnetion(std::shared_ptr<con> &curcon,void *res){ res=new std::byte[sizeof(con)]; std::pmr::monotonic_buffer_resource resource(res, sizeof(res)); std::pmr::polymorphic_allocator<con> allocator(&resource); curcon=std::allocate_shared<con>(allocator,con(shared_from_this())); res=new con(shared_from_this()); curcon=std::shared_ptr<con>(reinterpret_cast<con*>(res)); }; event::event(std::shared_ptr<socket> &serversocket,int timeout) : _ServerSocket(serversocket) { Loading Loading
src/event/epoll.cpp +2 −4 Changes for src/event/epoll.cpp: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -378,10 +378,8 @@ namespace netplus { }; void event::CreateConnetion(std::shared_ptr<con> &curcon,void *res){ res=new std::byte[sizeof(con)]; std::pmr::monotonic_buffer_resource resource(res, sizeof(res)); std::pmr::polymorphic_allocator<con> allocator(&resource); curcon=std::allocate_shared<con>(allocator,con(shared_from_this())); res=new con(shared_from_this()); curcon=std::shared_ptr<con>(reinterpret_cast<con*>(res)); }; event::event(std::shared_ptr<socket> &serversocket,int timeout) : _ServerSocket(serversocket) { Loading