summaryrefslogtreecommitdiff
path: root/plugins
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 /plugins
parent0bb5a6b57b308c1bd7463e767c6b0dc05acf7571 (diff)
minor code cleaning
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/msgs.cpp3
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 28bd1946af..457ce4b621 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -145,8 +145,7 @@ INT_PTR SendMessageCommand_Worker(MCONTACT hContact, LPCSTR pszMsg, bool isWchar
if (0 == (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 0;
- auto *pDlg = Srmm_FindDialog(hContact);
- if (pDlg) {
+ if (auto *pDlg = Srmm_FindDialog(hContact)) {
if (pszMsg) {
HWND hEdit = GetDlgItem(pDlg->GetHwnd(), IDC_SRMM_MESSAGE);
SendMessage(hEdit, EM_SETSEL, -1, GetWindowTextLength(hEdit));
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 880112e041..b6304c3114 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -339,8 +339,7 @@ public:
bool OnApply() override
{
- CMsgDialog *dat = Srmm_FindDialog(m_hContact);
- if (dat) {
+ if (auto *dat = Srmm_FindDialog(m_hContact)) {
uint32_t dwOldFlags = (dat->m_dwFlags & MWF_LOG_ALL);
dat->SetDialogToType();
dat->LoadLocalFlags();