added a comment to class Char

This commit is contained in:
Kjistóf 2016-10-29 11:39:18 +02:00
parent 69d51127a0
commit de6273cc63

View File

@ -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