diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index 4aec25d34..a7baed403 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -131,7 +131,7 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), // `row id` is not supported by soci on Sqlite3. It's necessary to cast id to int... return q->getBackend() == AbstractDb::Sqlite3 ? static_cast(row.get(0)) - : row.get(0); + : static_cast(row.get(0)); } long long MainDbPrivate::insertSipAddress (const string &sipAddress) { @@ -1870,10 +1870,9 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), tm lastUpdateTime = row.get(4); int capabilities = row.get(5); string subject = row.get(6); - unsigned int lastNotifyId = static_cast(getBackend() == Backend::Mysql + unsigned int lastNotifyId = (getBackend() == Backend::Mysql) ? row.get(7, 0) - : row.get(7, 0) - ); + : static_cast(row.get(7, 0)); if (capabilities & static_cast(ChatRoom::Capabilities::Basic)) { chatRoom = core->getPrivate()->createBasicChatRoom(