no need to use a pointer to a unique_ptr when we can just use the pointer
This commit is contained in:
@@ -248,9 +248,9 @@ void NodeMap::renderFinished() {
|
||||
|
||||
// Retain the StillImage object until the buffer is deleted.
|
||||
[](char *, void *hint) {
|
||||
delete reinterpret_cast<std::unique_ptr<const mbgl::StillImage> *>(hint);
|
||||
delete reinterpret_cast<const mbgl::StillImage *>(hint);
|
||||
},
|
||||
new std::unique_ptr<const mbgl::StillImage>(std::move(img))
|
||||
const_cast<mbgl::StillImage *>(img.release())
|
||||
);
|
||||
|
||||
result->Set(NanNew("pixels"), pixels);
|
||||
|
||||
Reference in New Issue
Block a user