Remove possibly redundant allocations

This commit is contained in:
alesapin 2021-02-21 20:42:19 +03:00
parent e447dd72f4
commit f8a581daba

View File

@ -447,7 +447,7 @@ LogEntryPtr Changelog::getLastEntry() const
if (entry == logs.end())
return fake_entry;
return makeClone(entry->second);
return entry->second;
}
LogEntriesPtr Changelog::getLogEntriesBetween(size_t start, size_t end)
@ -472,7 +472,7 @@ LogEntryPtr Changelog::entryAt(size_t index)
return nullptr;
src = entry->second;
return makeClone(src);
return src;
}
nuraft::ptr<nuraft::buffer> Changelog::serializeEntriesToBuffer(size_t index, int32_t count)