Tracker: small code simplication

Use std::max() to avoid comparison and turn into 1-liner.
This commit is contained in:
John Scipione 2014-07-28 10:53:58 -04:00
parent 54e2dd7272
commit 3c4e26995c

View File

@ -35,11 +35,14 @@ their respective holders. All rights reserved.
// NavMenu is a hierarchical menu of volumes, folders, files and queries
// displays icons, uses the SlowMenu API for full interruptability
#include <stdlib.h>
#include <strings.h>
#include "NavMenu.h"
#include <algorithm>
#include <string.h>
#include <stdlib.h>
#include <Application.h>
#include <Catalog.h>
#include <Debug.h>
@ -768,8 +771,7 @@ BNavMenu::DoneBuildingItemList()
int32
BNavMenu::GetMaxMenuWidth(void)
{
int32 width = (int32)(BScreen().Frame().Width() / 4);
return (width < kMinMenuWidth) ? kMinMenuWidth : width;
return std::max((int32)(BScreen().Frame().Width() / 4), kMinMenuWidth);
}