From 02163636a6543eef2220e832be68609d6ed9a706 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 18 Dec 2020 04:21:51 +0100 Subject: Fix some shadow warnings --- src/Olm.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/Olm.cpp') diff --git a/src/Olm.cpp b/src/Olm.cpp index 0dbd5124..67006490 100644 --- a/src/Olm.cpp +++ b/src/Olm.cpp @@ -241,32 +241,32 @@ handle_olm_message(const OlmMessage &msg) } using namespace mtx::events; - if (auto e = + if (auto e1 = std::get_if>(&device_event)) { - ChatPage::instance()->receivedDeviceVerificationAccept(e->content); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationAccept(e1->content); + } else if (auto e2 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationRequest(e->content, - e->sender); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationRequest(e2->content, + e2->sender); + } else if (auto e3 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationCancel(e->content); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationCancel(e3->content); + } else if (auto e4 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationKey(e->content); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationKey(e4->content); + } else if (auto e5 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationMac(e->content); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationMac(e5->content); + } else if (auto e6 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationStart(e->content, - e->sender); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationStart(e6->content, + e6->sender); + } else if (auto e7 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationReady(e->content); - } else if (auto e = std::get_if>( + ChatPage::instance()->receivedDeviceVerificationReady(e7->content); + } else if (auto e8 = std::get_if>( &device_event)) { - ChatPage::instance()->receivedDeviceVerificationDone(e->content); + ChatPage::instance()->receivedDeviceVerificationDone(e8->content); } else if (auto roomKey = std::get_if>(&device_event)) { create_inbound_megolm_session(*roomKey, msg.sender_key); @@ -346,9 +346,9 @@ handle_olm_message(const OlmMessage &msg) request_id_to_secret_name.erase(secret_name); } - } else if (auto e = + } else if (auto sec_req = std::get_if>(&device_event)) { - handle_secret_request(e, msg.sender); + handle_secret_request(sec_req, msg.sender); } return; -- cgit 1.5.1