MCPcopy Create free account
hub / github.com/apache/trafficserver / swap

Function swap

lib/yamlcpp/include/yaml-cpp/binary.h:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }
35
36 void swap(std::vector<unsigned char> &rhs) {
37 if (m_unownedData) {
38 m_data.swap(rhs);
39 rhs.clear();
40 rhs.resize(m_unownedSize);
41 std::copy(m_unownedData, m_unownedData + m_unownedSize, rhs.begin());
42 m_unownedData = nullptr;
43 m_unownedSize = 0;
44 } else {
45 m_data.swap(rhs);
46 }
47 }
48
49 bool operator==(const Binary &rhs) const {
50 const std::size_t s = size();

Callers 11

SettingChangesClass · 0.85
MemArena.ccFile · 0.85
ErrataMethod · 0.85
operator=Method · 0.85
_reconfigureMethod · 0.85
setup_data_ctxMethod · 0.85
rxp_commit_matchMethod · 0.85
sni_config_contFunction · 0.85
Lock.hFile · 0.85
clearMethod · 0.85
swapMethod · 0.85

Calls 5

copyFunction · 0.50
swapMethod · 0.45
clearMethod · 0.45
resizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected