MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / MakeMutable

Method MakeMutable

engine/Poseidon/Foundation/Strings/RString.hpp:95–101  ·  view source on GitHub ↗

Copy-on-write: if the buffer is shared, split off a private copy.

Source from the content-addressed store, hash-verified

93
94 // Copy-on-write: if the buffer is shared, split off a private copy.
95 void MakeMutable()
96 {
97 if (_ref && _ref->RefCounter() > 1)
98 {
99 _ref = CreateString(_ref->Data());
100 }
101 }
102 void Lower()
103 {
104 MakeMutable();

Callers 1

ReplacesCharsFunction · 0.80

Calls 3

CreateStringFunction · 0.85
RefCounterMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected