summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-07-25 12:00:07 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-07-25 12:00:07 +0300
commit70ac346e02ac4e7125bdddd1012d622c43dbd5c6 (patch)
tree56e2dd4e0501a1237b90a151447d723833d7a4f5 /src/core/stdmsg
parent0bb5a6b57b308c1bd7463e767c6b0dc05acf7571 (diff)
minor code cleaning
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/globals.cpp7
-rw-r--r--src/core/stdmsg/src/msgs.cpp3
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index 76c1cf5a2b..21a6f8e752 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -40,11 +40,10 @@ static int OnShutdown(WPARAM, LPARAM)
static int OnMetaChanged(WPARAM hMeta, LPARAM)
{
- if (hMeta) {
- auto *pDlg = Srmm_FindDialog(hMeta);
- if (pDlg != nullptr)
+ if (hMeta)
+ if (auto *pDlg = Srmm_FindDialog(hMeta))
pDlg->UpdateAvatar();
- }
+
return 0;
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index eab4269b80..0e9287aca7 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -236,8 +236,7 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)
// If a contact gets deleted, close its message window if there is any
static int ContactDeleted(WPARAM hContact, LPARAM)
{
- auto *pDlg = Srmm_FindDialog(hContact);
- if (pDlg)
+ if (auto *pDlg = Srmm_FindDialog(hContact))
pDlg->CloseTab();
return 0;