You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in several places you are using strlen(x.c_str())
This is quite inefficient because strlen has to walk the string which is O(n). Instead, std::string has a length method which is O(1)
for example, the following code:
int n = strlen(http_str.c_str());
would be more efficient and readable like this:
auto n = http_str.length();
The text was updated successfully, but these errors were encountered:
in several places you are using strlen(x.c_str())
This is quite inefficient because strlen has to walk the string which is O(n). Instead, std::string has a length method which is O(1)
for example, the following code:
int n = strlen(http_str.c_str());
would be more efficient and readable like this:
auto n = http_str.length();
The text was updated successfully, but these errors were encountered: