Ticket #3845: reactor_op_queue.patch

File reactor_op_queue.patch, 1.7 KB (added by Yuriy A. Krasnoschek <aka.rider@…>, 13 years ago)
  • reactor_op_queue.hpp

     
    371371  class op
    372372    : public op_base
    373373  {
     374        typedef op<Operation> this_type;       
    374375  public:
    375376    // Constructor.
    376377    op(Descriptor descriptor, Operation operation)
    377       : op_base(&op<Operation>::do_perform, &op<Operation>::do_complete,
    378           &op<Operation>::do_destroy, descriptor),
     378      : op_base(&this_type::do_perform, &this_type::do_complete,
     379          &this_type::do_destroy, descriptor),
    379380        operation_(operation)
    380381    {
    381382    }
     
    384385    static bool do_perform(op_base* base,
    385386        boost::system::error_code& result, std::size_t& bytes_transferred)
    386387    {
    387       return static_cast<op<Operation>*>(base)->operation_.perform(
     388      return static_cast<this_type*>(base)->operation_.perform(
    388389          result, bytes_transferred);
    389390    }
    390391
     
    393394        const boost::system::error_code& result, std::size_t bytes_transferred)
    394395    {
    395396      // Take ownership of the operation object.
    396       typedef op<Operation> this_type;
    397397      this_type* this_op(static_cast<this_type*>(base));
    398398      typedef handler_alloc_traits<Operation, this_type> alloc_traits;
    399399      handler_ptr<alloc_traits> ptr(this_op->operation_, this_op);
     
    414414    static void do_destroy(op_base* base)
    415415    {
    416416      // Take ownership of the operation object.
    417       typedef op<Operation> this_type;
    418417      this_type* this_op(static_cast<this_type*>(base));
    419418      typedef handler_alloc_traits<Operation, this_type> alloc_traits;
    420419      handler_ptr<alloc_traits> ptr(this_op->operation_, this_op);