sticker/Database: allow moving

This commit is contained in:
Max Kellermann 2023-07-23 09:34:18 +02:00
parent 83a6cb804b
commit 8743326924
2 changed files with 5 additions and 1 deletions

View File

@ -93,7 +93,8 @@ StickerDatabase::StickerDatabase(Path path)
StickerDatabase::~StickerDatabase() noexcept
{
assert(db != nullptr);
if (db == nullptr)
return;
for (const auto &sticker : stmt) {
assert(sticker != nullptr);

View File

@ -65,6 +65,9 @@ public:
StickerDatabase(Path path);
~StickerDatabase() noexcept;
StickerDatabase(StickerDatabase &&) noexcept = default;
StickerDatabase &operator=(StickerDatabase &&) noexcept = default;
/**
* Returns one value from an object's sticker record. Returns an
* empty string if the value doesn't exist.