diff OrthancFramework/Sources/StringMemoryBuffer.cpp @ 4819:70d2a97ca8cb openssl-3.x

integration mainline->openssl-3.x
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Nov 2021 13:12:32 +0100
parents 434843934307
children 7053502fbf97
line wrap: on
line diff
--- a/OrthancFramework/Sources/StringMemoryBuffer.cpp	Mon Aug 30 22:21:24 2021 +0200
+++ b/OrthancFramework/Sources/StringMemoryBuffer.cpp	Thu Nov 25 13:12:32 2021 +0100
@@ -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();
+  }
 }