Skip to content

CID 1517812: Performance inefficiencies #10011

@zwoop

Description

@zwoop
*** CID 1517812:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/iocore/net/[UnixUDPNet.cc](http://unixudpnet.cc/): 97 in UDPPacket::new_incoming_UDPPacket(sockaddr *, sockaddr *, Ptr<IOBufferBlock>)()
91     
92       p->p.in_the_priority_queue = 0;
93       p->p.in_heap               = 0;
94       p->p.delivery_time         = 0;
95       ats_ip_copy(&p->from, from);
96       ats_ip_copy(&p->to, to);
   CID 1517812:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
   "block" is copied in a call to copy assignment "operator =", when it could be moved instead.
97       p->p.chain = block;
98     
99       return p;
100     }
101     
102     UDPPacket::UDPPacket()

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions