File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -75,26 +75,17 @@ namespace samilton {
7575 }
7676
7777 ConsoleString &operator =(const std::string &val) {
78- clear ();
7978 _parseString (val);
8079 return *this ;
8180 }
8281
83- ConsoleString &operator =(const char *val) {
84- clear ();
85- _parseString (std::string (val));
86- return *this ;
87- }
88-
8982 ConsoleString &operator =(const char &val) {
90- clear ();
9183 _parseString (std::string (1 , val));
9284 return *this ;
9385 }
9486
9587 template <class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type>
9688 ConsoleString &operator =(const T &val) {
97- clear ();
9889 _str.push_back (std::to_string (val));
9990 return *this ;
10091 }
@@ -140,6 +131,7 @@ namespace samilton {
140131 friend std::ostream &operator <<(std::ostream &stream, ConsoleTable &table);
141132
142133 void _parseString (const std::string &val) {
134+ clear ();
143135 auto tmpIterator = val.begin ();
144136 for (auto i = val.begin (); i < val.end (); ++i) {
145137 if (*i == ' \n ' ) {
You can’t perform that action at this time.
0 commit comments