• Pavlo Kushnir's avatar
    Optimize copy/move · 1c523f26
    Pavlo Kushnir authored
    Summary: this diff provides methods that allow to avoid temporaries while cloning IOBufs. Also optimizes move constructor a bit - there is no need to call `decrementRefCount`, check for self assignment, etc.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D3250456
    
    fb-gh-sync-id: 32b0180c28f36151c6786dba6f511b491b224200
    fbshipit-source-id: 32b0180c28f36151c6786dba6f511b491b224200
    1c523f26
IOBuf.h 50.3 KB