@@ -2078,7 +2078,7 @@ void ControllerClientImpl::ListFilesInController(std::vector<FileEntry>& fileent
20782078 }
20792079}
20802080
2081- void ControllerClientImpl::CreateLogEntries (const std::vector<LogEntryPtr >& logEntries, std::vector<std::string>& createdLogEntryIds, double timeout)
2081+ void ControllerClientImpl::CreateLogEntries (const std::vector<LogEntry >& logEntries, std::vector<std::string>& createdLogEntryIds, double timeout)
20822082{
20832083 if (logEntries.empty ()) {
20842084 return ;
@@ -2104,32 +2104,25 @@ void ControllerClientImpl::CreateLogEntries(const std::vector<LogEntryPtr>& logE
21042104 rapidjson::StringBuffer& rRequestStringBuffer = _rRequestStringBufferCache;
21052105 rapidjson::Writer<rapidjson::StringBuffer> writer (rRequestStringBuffer);
21062106
2107- for (const LogEntryPtr logEntry : logEntries) {
2108- if (!logEntry) {
2109- continue ;
2110- }
2111-
2107+ for (const LogEntry &logEntry : logEntries) {
21122108 // add log entry content
21132109 rRequestStringBuffer.Clear ();
21142110 writer.Reset (rRequestStringBuffer);
2115- logEntry-> rEntry .Accept (writer);
2116- std::string formName = " logEntry/" + logEntry-> logType ;
2111+ logEntry. rEntry .Accept (writer);
2112+ std::string formName = " logEntry/" + logEntry. logType ;
21172113 curl_formadd (&formpost, &lastptr,
21182114 CURLFORM_COPYNAME, formName.c_str (),
21192115 CURLFORM_COPYCONTENTS, rRequestStringBuffer.GetString (),
21202116 CURLFORM_CONTENTTYPE, " application/json" ,
21212117 CURLFORM_END);
21222118
21232119 // add attachments
2124- for (const LogEntryAttachmentPtr attachment : logEntry->attachments ) {
2125- if (!attachment) {
2126- continue ;
2127- }
2120+ for (const LogEntryAttachment &attachment : logEntry.attachments ) {
21282121 curl_formadd (&formpost, &lastptr,
21292122 CURLFORM_COPYNAME, " attachment" ,
2130- CURLFORM_BUFFER, attachment-> filename .c_str (),
2131- CURLFORM_BUFFERPTR, attachment-> data .data (),
2132- CURLFORM_BUFFERLENGTH, (long )(attachment-> data .size ()),
2123+ CURLFORM_BUFFER, attachment. filename .c_str (),
2124+ CURLFORM_BUFFERPTR, attachment. data .data (),
2125+ CURLFORM_BUFFERLENGTH, (long )(attachment. data .size ()),
21332126 CURLFORM_END);
21342127 }
21352128 }
0 commit comments