[RemoteMirrors] Change MemoryReader::readBytes to return a unique_ptr instead of a tuple so that the destructor handles freeing the memory.

This commit is contained in:
Mike Ash
2018-03-02 12:05:36 -05:00
parent 1434fce417
commit 553ef86a4b
5 changed files with 55 additions and 76 deletions

View File

@@ -42,9 +42,8 @@ class InProcessMemoryReader final : public MemoryReader {
return true;
}
std::tuple<const void *, std::function<void()>>
readBytes(RemoteAddress address, uint64_t size) override {
return std::make_tuple(address.getLocalPointer<void>(), []{});
ReadBytesResult readBytes(RemoteAddress address, uint64_t size) override {
return ReadBytesResult(address.getLocalPointer<void>(), [](const void *) {});
}
};