diff options
Diffstat (limited to 'memfilepersistence')
-rw-r--r-- | memfilepersistence/src/vespa/memfilepersistence/mapper/simplememfileiobuffer.cpp | 4 | ||||
-rw-r--r-- | memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/simplememfileiobuffer.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/simplememfileiobuffer.cpp index da3b180201e..6e071969218 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/simplememfileiobuffer.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/simplememfileiobuffer.cpp @@ -292,7 +292,7 @@ SimpleMemFileIOBuffer::allocateBuffer(DocumentPart part, // If the requested size is greater than or equal to our working buffer // size, simply allocate a separate buffer for it. if (sz >= WORKING_BUFFER_SIZE) { - return BufferAllocation(SharedBuffer::SP(new SharedBuffer(sz)), 0, sz); + return BufferAllocation(std::make_shared<SharedBuffer>(sz), 0, sz); } SharedBuffer::SP &bufSP(_workingBuffers[part]); @@ -308,7 +308,7 @@ SimpleMemFileIOBuffer::allocateBuffer(DocumentPart part, static_cast<uint32_t>(bufSP->allocate(sz, align)), sz); } else { - SharedBuffer::SP newBuf(new SharedBuffer(WORKING_BUFFER_SIZE)); + auto newBuf = std::make_shared<SharedBuffer>(WORKING_BUFFER_SIZE); bufSP = newBuf; return BufferAllocation(newBuf, static_cast<uint32_t>(newBuf->allocate(sz, align)), diff --git a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp index 409789eadcc..efa26605f37 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp @@ -203,7 +203,7 @@ MemFileCache::get(const BucketId& id, Environment& env, Directory& dir, // in the common case that there's a bucket file on the disk. The // content layer shall guarantee that no concurrent operations happen // for a single bucket, so this should be fully thread safe. - Entry::SP entry(new Entry(file, env, createIfNotExisting)); + auto entry = std::make_shared<Entry>(file, env, createIfNotExisting); vespalib::LockGuard reLock(_cacheLock); std::pair<LRUCache::iterator, bool> inserted( |