Mercurial > hg > orthanc
changeset 6381:6000d19f10b1
cppcheck: stlcstrParam
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Mon, 10 Nov 2025 18:11:42 +0100 |
| parents | 002e1521458f |
| children | a6cac4870a06 |
| files | OrthancFramework/Sources/HttpServer/HttpOutput.cpp OrthancFramework/UnitTestsSources/FileStorageTests.cpp OrthancServer/Sources/Search/HierarchicalMatcher.cpp |
| diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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<IMemoryBuffer> buffer(s.ReadWhole(uid, FileContentType_Unknown)); @@ -83,7 +83,7 @@ std::vector<uint8_t> 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<IMemoryBuffer> 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); }
--- 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<DcmElement> cloned(FromDcmtkBridge::CreateElementForTag(*it, currentPrivateCreator.c_str())); + std::unique_ptr<DcmElement> cloned(FromDcmtkBridge::CreateElementForTag(*it, currentPrivateCreator)); cloned->copyFrom(*element); target->insert(cloned.release()); }
