Copy-on-write: if the buffer is shared, split off a private copy.
| 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(); |
no test coverage detected