use util::ptr as a wrapper around std::shared_ptr that asserts nonemptiness

This commit is contained in:
Konstantin Käfer
2014-09-16 16:38:32 +02:00
parent 6c526e5637
commit f26bb724dc
60 changed files with 237 additions and 214 deletions

View File

@@ -62,7 +62,7 @@ void SQLiteStore::createSchema() {
}
struct GetBaton {
std::shared_ptr<Database> db;
util::ptr<Database> db;
std::string path;
ResourceType type;
void *ptr = nullptr;
@@ -120,7 +120,7 @@ void SQLiteStore::get(const std::string &path, GetCallback callback, void *ptr)
struct PutBaton {
std::shared_ptr<Database> db;
util::ptr<Database> db;
std::string path;
ResourceType type;
Response response;
@@ -164,7 +164,7 @@ void SQLiteStore::put(const std::string &path, ResourceType type, const Response
}
struct ExpirationBaton {
std::shared_ptr<Database> db;
util::ptr<Database> db;
std::string path;
int64_t expires;
};