mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 00:11:44 +00:00
Replace a MIN with a locally defined Min()
This commit is contained in:
parent
203aea26bd
commit
3a935b6fb0
@ -68,6 +68,8 @@ void CHistoryMenu::Update(void)
|
|||||||
UMenuUtils::PurgeMenuItems(GetMacMenuH(), GetLastNonDynamicItem());
|
UMenuUtils::PurgeMenuItems(GetMacMenuH(), GetLastNonDynamicItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define Min(a,b) (((a) < (b)) ? (a) : (b))
|
||||||
|
|
||||||
// Rebuild history menu
|
// Rebuild history menu
|
||||||
void CHistoryMenu::SyncMenuToHistory(CNSContext* inNSContext)
|
void CHistoryMenu::SyncMenuToHistory(CNSContext* inNSContext)
|
||||||
{
|
{
|
||||||
@ -80,7 +82,7 @@ void CHistoryMenu::SyncMenuToHistory(CNSContext* inNSContext)
|
|||||||
|
|
||||||
// this is total number of history menu items we want in menu
|
// this is total number of history menu items we want in menu
|
||||||
// add one because we loop from 1 -> num instead of from 0 -> (num - 1)
|
// add one because we loop from 1 -> num instead of from 0 -> (num - 1)
|
||||||
numHistoryMenuEntries = MIN(historyLength, cMaxHistoryMenuItems) + 1;
|
numHistoryMenuEntries = Min(historyLength, cMaxHistoryMenuItems) + 1;
|
||||||
|
|
||||||
Int16 count = 1,
|
Int16 count = 1,
|
||||||
// since we want most recent history entries, grab entries from end
|
// since we want most recent history entries, grab entries from end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user