# HG changeset patch # User Alain Mazy # Date 1762794702 -3600 # Node ID 6000d19f10b15f1f2492bfc9ed23648ba7bbcd24 # Parent 002e1521458f0b9454edca6e1de8caf5a1197006 cppcheck: stlcstrParam diff -r 002e1521458f -r 6000d19f10b1 OrthancFramework/Sources/HttpServer/HttpOutput.cpp --- a/OrthancFramework/Sources/HttpServer/HttpOutput.cpp Mon Nov 10 18:08:25 2025 +0100 +++ b/OrthancFramework/Sources/HttpServer/HttpOutput.cpp Mon Nov 10 18:11:42 2025 +0100 @@ -976,7 +976,7 @@ stateMachine_.AddHeader("Content-Disposition", "filename=\"" + std::string(filename) + "\""); } - stateMachine_.StartStream(contentType.c_str()); + stateMachine_.StartStream(contentType); while (stream.ReadNextChunk()) { @@ -988,7 +988,7 @@ void HttpOutput::StartStream(const std::string& contentType) { - stateMachine_.StartStream(contentType.c_str()); + stateMachine_.StartStream(contentType); } void HttpOutput::SendStreamItem(const void* data, diff -r 002e1521458f -r 6000d19f10b1 OrthancFramework/UnitTestsSources/FileStorageTests.cpp --- a/OrthancFramework/UnitTestsSources/FileStorageTests.cpp Mon Nov 10 18:08:25 2025 +0100 +++ b/OrthancFramework/UnitTestsSources/FileStorageTests.cpp Mon Nov 10 18:11:42 2025 +0100 @@ -59,7 +59,7 @@ std::string data = Toolbox::GenerateUuid(); std::string uid = Toolbox::GenerateUuid(); - s.Create(uid.c_str(), &data[0], data.size(), FileContentType_Unknown); + s.Create(uid, &data[0], data.size(), FileContentType_Unknown); std::string d; { std::unique_ptr buffer(s.ReadWhole(uid, FileContentType_Unknown)); @@ -83,7 +83,7 @@ std::vector data; StringToVector(data, Toolbox::GenerateUuid()); std::string uid = Toolbox::GenerateUuid(); - s.Create(uid.c_str(), &data[0], data.size(), FileContentType_Unknown); + s.Create(uid, &data[0], data.size(), FileContentType_Unknown); std::string d; { std::unique_ptr buffer(s.ReadWhole(uid, FileContentType_Unknown)); @@ -167,7 +167,7 @@ { std::string t = Toolbox::GenerateUuid(); std::string uid = Toolbox::GenerateUuid(); - s.Create(uid.c_str(), &t[0], t.size(), FileContentType_Unknown); + s.Create(uid, &t[0], t.size(), FileContentType_Unknown); u.push_back(uid); } diff -r 002e1521458f -r 6000d19f10b1 OrthancServer/Sources/Search/HierarchicalMatcher.cpp --- a/OrthancServer/Sources/Search/HierarchicalMatcher.cpp Mon Nov 10 18:08:25 2025 +0100 +++ b/OrthancServer/Sources/Search/HierarchicalMatcher.cpp Mon Nov 10 18:11:42 2025 +0100 @@ -272,7 +272,7 @@ currentPrivateCreator = ""; } - std::unique_ptr cloned(FromDcmtkBridge::CreateElementForTag(*it, currentPrivateCreator.c_str())); + std::unique_ptr cloned(FromDcmtkBridge::CreateElementForTag(*it, currentPrivateCreator)); cloned->copyFrom(*element); target->insert(cloned.release()); }