made Char ctor explicit

This commit is contained in:
Kjistóf 2016-10-23 18:00:22 +02:00
parent bc0fc06772
commit 06cebc829e
2 changed files with 1 additions and 3 deletions

3
Char.h
View File

@ -5,7 +5,6 @@ class StringValue;
// TODO: think about making ctors explict
/* This class provides a simple wrapper for a char primitive, and implements /* This class provides a simple wrapper for a char primitive, and implements
* copy-on-write semantics for the non-const String::operator[] via some magic */ * copy-on-write semantics for the non-const String::operator[] via some magic */
class Char class Char
@ -17,7 +16,7 @@ private:
public: public:
Char(size_t index, String& string) :_index(index), _string(string) {} explicit Char(size_t index, String& string) :_index(index), _string(string) {}
operator char() const; operator char() const;
Char& operator=(char other); Char& operator=(char other);
}; };

View File

@ -6,7 +6,6 @@ class Char;
// TODO: think about making ctors explict
/* Design decisions: /* Design decisions:
* - Everything related to ref-counting is the responsibility of the StringValue class * - Everything related to ref-counting is the responsibility of the StringValue class
* - Anything dynamically allocated is owned (and thus once deleted) by the StringValue class * - Anything dynamically allocated is owned (and thus once deleted) by the StringValue class