fix handling around unique_ptr releases

This commit is contained in:
Konstantin Käfer
2015-02-13 15:09:11 -08:00
committed by Konstantin Käfer
parent 8408dc9e4d
commit 8c0acecbe3
3 changed files with 2 additions and 3 deletions

View File

@@ -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);
}
}

View File

@@ -108,7 +108,6 @@ Image::Image(const std::string &source_data) {
CFRelease(data);
width = 0;
height = 0;
img.release();
return;
}

View File

@@ -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();
}
}
}