From ae5c2aa9acce500e2ad94c6781843c02310dbab3 Mon Sep 17 00:00:00 2001
From: Kitsune Ral <Kitsune-Ral@users.sf.net>
Date: Fri, 1 Nov 2019 20:47:07 +0900
Subject: Omittable: Add direct-list-initialising operator=; document

See the change in connection.cpp for the example of usage.

Also: removed static_asserts: the first one is provided by std::optional,
and the second one is only relevant to edit().
---
 lib/connection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/connection.cpp')

diff --git a/lib/connection.cpp b/lib/connection.cpp
index 998b45d1..5ee7e84e 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -279,7 +279,7 @@ void Connection::reloadCapabilities()
 
         if (!d->capabilities.roomVersions) {
             qCWarning(MAIN) << "Pinning supported room version to 1";
-            d->capabilities.roomVersions.emplace({ "1", { { "1", "stable" } } });
+            d->capabilities.roomVersions = { "1", { { "1", "stable" } } };
         } else {
             qCDebug(MAIN) << "Room versions:" << defaultRoomVersion()
                           << "is default, full list:" << availableRoomVersions();
-- 
cgit v1.2.3