The string class contains methods which support receiving either a string literal or a string object.
For example, calls to append can receive either a char* or a string.
string& append (const string& str); string& append (const char* s);
Which make these cases equivalent, and the .c_str() useless:
std::string s = "123"; str.append(s); str.append(s.c_str());
In these cases, removing .c_str() doesn't provide any size or speed improvement.
It's only a readability issue.
If the string contains embedded NUL characters, the string literal and the string
object won't produce the same semantic.
I think this comment is incorrect, you want assignment, not equality.