added a comment to class Char
This commit is contained in:
parent
69d51127a0
commit
de6273cc63
1
Char.cpp
1
Char.cpp
@ -5,6 +5,7 @@
|
|||||||
Char::operator char() const
|
Char::operator char() const
|
||||||
{ return _string._str->operator[](_index); }
|
{ return _string._str->operator[](_index); }
|
||||||
|
|
||||||
|
// copy-on-write magic happens here
|
||||||
Char& Char::operator=(char other)
|
Char& Char::operator=(char other)
|
||||||
{
|
{
|
||||||
auto data = new char[_string.size() + 1]; // space for old string & null-terminator
|
auto data = new char[_string.size() + 1]; // space for old string & null-terminator
|
||||||
|
Loading…
Reference in New Issue
Block a user