diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2023-10-21 04:54:01 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-10-24 21:17:16 +0300 |
commit | 26eee3a154f234d4cea80ba40a2091b739a60593 (patch) | |
tree | 029c1f2af856493d5f42d330d94d12d8dc778976 /include | |
parent | 9d33a47c0bf544cba8557683f8c6d28aaf658355 (diff) | |
download | bmcweb-26eee3a154f234d4cea80ba40a2091b739a60593.tar.xz |
multipart-parser: eliminate temporary to emplace_back
Fix the following clang-tidy warning:
```
../include/multipart_parser.hpp:108:50: error: unnecessary temporary object created while calling emplace_back [modernize-use-emplace,-warnings-as-errors]
108 | mime_fields.emplace_back(FormPart{});
| ^~~~~~~~~~
```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I362b4ad7f90f80a7746b79d643e3a7c5ff1db78c
Diffstat (limited to 'include')
-rw-r--r-- | include/multipart_parser.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp index 94983f2456..9adf564cc7 100644 --- a/include/multipart_parser.hpp +++ b/include/multipart_parser.hpp @@ -105,7 +105,7 @@ class MultipartParser return ParserError::ERROR_BOUNDARY_LF; } index = 0; - mime_fields.emplace_back(FormPart{}); + mime_fields.emplace_back(); state = State::HEADER_FIELD_START; break; } @@ -305,7 +305,7 @@ class MultipartParser { // unset the PART_BOUNDARY flag flags = Boundary::NON_BOUNDARY; - mime_fields.emplace_back(FormPart{}); + mime_fields.emplace_back(); state = State::HEADER_FIELD_START; return ParserError::PARSER_SUCCESS; } |