Skip to content

Commit 12f72a4

Browse files
committed
exch: delete duplicate MAPI_MODIFY definitions
MFCMAPI displays PR_ACCESS_LEVEL with MAPI_MODIFY / 0 as canonicalized values.
1 parent 7a759f6 commit 12f72a4

File tree

5 files changed

+4
-11
lines changed

5 files changed

+4
-11
lines changed

exch/emsmdb/attachment_object.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ static BOOL attachment_object_get_calculated_property(const attachment_object *p
223223
*ppvalue = v;
224224
if (*ppvalue == nullptr)
225225
return FALSE;
226-
*v = (pattachment->open_flags & MAPI_MODIFY) ?
227-
ACCESS_LEVEL_MODIFY : ACCESS_LEVEL_READ_ONLY;
226+
*v = pattachment->open_flags & MAPI_MODIFY;
228227
return TRUE;
229228
}
230229
case PR_OBJECT_TYPE: {

exch/emsmdb/message_object.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,7 @@ static BOOL message_object_get_calculated_property(const message_object *pmessag
833833
*ppvalue = v;
834834
if (*ppvalue == nullptr)
835835
return FALSE;
836-
*v = (pmessage->open_flags & MAPI_MODIFY) ?
837-
ACCESS_LEVEL_MODIFY : ACCESS_LEVEL_READ_ONLY;
836+
*v = pmessage->open_flags & MAPI_MODIFY;
838837
return TRUE;
839838
}
840839
case PR_ENTRYID:

exch/zcore/attachment_object.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ static BOOL attachment_object_get_calculated_property(attachment_object *pattach
178178
*ppvalue = cu_alloc<uint32_t>();
179179
if (*ppvalue == nullptr)
180180
return FALSE;
181-
*static_cast<uint32_t *>(*ppvalue) = pattachment->b_writable ?
182-
ACCESS_LEVEL_MODIFY : ACCESS_LEVEL_READ_ONLY;
181+
*static_cast<uint32_t *>(*ppvalue) = pattachment->b_writable ? MAPI_MODIFY : 0;
183182
return TRUE;
184183
case PR_OBJECT_TYPE: {
185184
auto v = cu_alloc<uint32_t>();

exch/zcore/message_object.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,7 @@ static BOOL message_object_get_calculated_property(message_object *pmessage,
702702
*ppvalue = cu_alloc<uint32_t>();
703703
if (*ppvalue == nullptr)
704704
return FALSE;
705-
*static_cast<uint32_t *>(*ppvalue) = pmessage->b_writable ?
706-
ACCESS_LEVEL_MODIFY : ACCESS_LEVEL_READ_ONLY;
705+
*static_cast<uint32_t *>(*ppvalue) = pmessage->b_writable ? MAPI_MODIFY : 0;
707706
return TRUE;
708707
case PR_ENTRYID:
709708
if (pmessage->message_id == 0)

include/gromox/mapi_types.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,9 +955,6 @@ enum {
955955
#define FIND_ROW_FLAG_FORWARD 0x0
956956
#define FIND_ROW_FLAG_BACKWARD 0x1
957957

958-
#define ACCESS_LEVEL_READ_ONLY 0x00000000
959-
#define ACCESS_LEVEL_MODIFY 0x00000001
960-
961958
#define SAVE_FLAG_KEEPOPENREADONLY 0x01
962959
#define SAVE_FLAG_KEEPOPENREADWRITE 0x02
963960
#define SAVE_FLAG_FORCESAVE 0x04

0 commit comments

Comments
 (0)