Menu

#20 MDialogUtils.cpp - better use of itemDisable

open
nobody
None
5
2003-10-20
2003-10-20
Chris Waco
No

The Mac constant itemDisable is used incorrectly in
MDialogUtils.cpp. For example, IsPushButton() does the
following:

    if \(itemType > itemDisable\)
         itemType -= itemDisable;

itemDisable is a flag and there is nothing preventing Apple
from adding an itemType bigger than itemDisable in future
versions of the OS.

This code should be changed to:

itemType &= ~itemDisable;

The code in question appears 4 times in the file.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB