Skip to content

Commit 247163a

Browse files
committed
exmdb: use references within detect_rcpt_type
1 parent 06e88ef commit 247163a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

exch/exmdb/message.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3599,16 +3599,16 @@ static unsigned int detect_rcpt_type(const char *account, const TARRAY_SET *rcpt
35993599
if (rcpts == nullptr)
36003600
return MAPI_BCC;
36013601
for (size_t i = 0; i < rcpts->count; ++i) {
3602-
auto rcpt = rcpts->pparray[i];
3603-
auto smtpaddr = rcpt->get<const char>(PR_SMTP_ADDRESS);
3602+
auto &rcpt = *rcpts->pparray[i];
3603+
auto smtpaddr = rcpt.get<const char>(PR_SMTP_ADDRESS);
36043604
if (smtpaddr == nullptr) {
3605-
auto addrtype = rcpt->get<const char>(PR_ADDRTYPE);
3605+
auto addrtype = rcpt.get<const char>(PR_ADDRTYPE);
36063606
if (addrtype != nullptr && strcasecmp(addrtype, "SMTP") == 0)
3607-
smtpaddr = rcpt->get<const char>(PR_EMAIL_ADDRESS);
3607+
smtpaddr = rcpt.get<const char>(PR_EMAIL_ADDRESS);
36083608
}
36093609
if (smtpaddr == nullptr || strcasecmp(account, smtpaddr) != 0)
36103610
continue;
3611-
auto type = rcpt->get<const uint32_t>(PR_RECIPIENT_TYPE);
3611+
auto type = rcpt.get<const uint32_t>(PR_RECIPIENT_TYPE);
36123612
if (type == nullptr)
36133613
continue;
36143614
if (*type == MAPI_TO || *type == MAPI_CC)

0 commit comments

Comments
 (0)