comparison 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
comparison
equal deleted inserted replaced
4790:9754d5f2f38a 4792:434843934307
45 { 45 {
46 std::unique_ptr<StringMemoryBuffer> result(new StringMemoryBuffer); 46 std::unique_ptr<StringMemoryBuffer> result(new StringMemoryBuffer);
47 result->Copy(buffer); 47 result->Copy(buffer);
48 return result.release(); 48 return result.release();
49 } 49 }
50
51
52 IMemoryBuffer* StringMemoryBuffer::CreateFromCopy(const std::string& buffer,
53 size_t start /* inclusive */,
54 size_t end /* exclusive */)
55 {
56 std::unique_ptr<StringMemoryBuffer> result(new StringMemoryBuffer);
57 result->Copy(buffer, start, end);
58 return result.release();
59 }
50 } 60 }