Avoid std::string copy in ssplit argument

- Other minor changes reported by sonarcloud
This commit is contained in:
Eduardo Arias
2024-08-12 06:18:20 -07:00
parent cc0f893854
commit 77adb57524
2 changed files with 21 additions and 21 deletions

View File

@@ -855,7 +855,7 @@ int Multipart::process_part_header(std::string *error, int offset) {
}
new_value = std::string(data);
utils::string::chomp(&new_value);
utils::string::chomp(new_value);
/* update the header value in the table */
header_value = m_mpp->m_headers.at(
@@ -924,7 +924,7 @@ int Multipart::process_part_header(std::string *error, int offset) {
i++;
}
header_value = std::string(data);
utils::string::chomp(&header_value);
utils::string::chomp(header_value);
/* error if the name already exists */
if (m_mpp->m_headers.count(header_name) > 0) {