diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-25 12:00:07 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-25 12:00:07 +0300 |
commit | 70ac346e02ac4e7125bdddd1012d622c43dbd5c6 (patch) | |
tree | 56e2dd4e0501a1237b90a151447d723833d7a4f5 /src/core/stdmsg | |
parent | 0bb5a6b57b308c1bd7463e767c6b0dc05acf7571 (diff) |
minor code cleaning
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/globals.cpp | 7 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 3 |
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;
|