performance improvements to CString (#9259)
- make sure CString("foo") calls the literal constructor
- avoid memory allocations when comparing to a literal
This commit is contained in:
@@ -53,10 +53,6 @@ CString::CString(size_t const length) {
|
||||
}
|
||||
}
|
||||
|
||||
CString::CString(const char* cstr)
|
||||
: CString(cstr, size_type(cstr ? strlen(cstr) : 0)) {
|
||||
}
|
||||
|
||||
CString::CString(const CString& rhs)
|
||||
: CString(rhs.c_str(), rhs.size()) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user