Mercurial > hg > orthanc
diff OrthancFramework/Sources/StringMemoryBuffer.cpp @ 4792:434843934307 storage-cache
Added a StorageCache in the StorageAccessor
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 30 Sep 2021 12:14:19 +0200 |
parents | 64f06e7d5fc7 |
children | 7053502fbf97 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/StringMemoryBuffer.cpp Tue Sep 14 14:51:12 2021 +0200 +++ b/OrthancFramework/Sources/StringMemoryBuffer.cpp Thu Sep 30 12:14:19 2021 +0200 @@ -47,4 +47,14 @@ result->Copy(buffer); return result.release(); } + + + IMemoryBuffer* StringMemoryBuffer::CreateFromCopy(const std::string& buffer, + size_t start /* inclusive */, + size_t end /* exclusive */) + { + std::unique_ptr<StringMemoryBuffer> result(new StringMemoryBuffer); + result->Copy(buffer, start, end); + return result.release(); + } }