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
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp
index 94983f2..9adf564 100644
--- a/include/multipart_parser.hpp
+++ b/include/multipart_parser.hpp
@@ -105,7 +105,7 @@
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 @@
{
// 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;
}