fix handling around unique_ptr releases
This commit is contained in:
committed by
Konstantin Käfer
parent
8408dc9e4d
commit
8c0acecbe3
@@ -34,7 +34,7 @@ public:
|
||||
MBGL_VERIFY_THREAD(tid);
|
||||
|
||||
if (source) {
|
||||
source->notify(this, observers, std::shared_ptr<const Response>(response.release()),
|
||||
source->notify(this, observers, std::shared_ptr<const Response>(std::move(response)),
|
||||
hint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ Image::Image(const std::string &source_data) {
|
||||
CFRelease(data);
|
||||
width = 0;
|
||||
height = 0;
|
||||
img.release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ void SQLiteCache::createDatabase() {
|
||||
db->exec(sql);
|
||||
} catch (mapbox::sqlite::Exception &ex) {
|
||||
Log::Error(Event::Database, "Failed to create database: %s", ex.what());
|
||||
db.release();
|
||||
db.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user