From 3c777060bc0cd21df830a078278bcf4f2f1ab3eb Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 29 Apr 2013 01:10:06 -0400 Subject: [PATCH] Fix gcc4 build, use max_c from SupportDefs instead of max --- src/kits/tracker/FindPanel.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 659a5fb03e..d25f668eb4 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -58,6 +58,7 @@ All rights reserved. #include #include #include +#include #include #include #include @@ -100,16 +101,18 @@ const uint32 kSwitchToQueryTemplate = 'swqt'; const uint32 kRunSaveAsTemplatePanel = 'svtm'; const uint32 kLatchChanged = 'ltch'; -const char* kDragNDropTypes [] = { +const char* kDragNDropTypes[] = { B_QUERY_MIMETYPE, - B_QUERY_TEMPLATE_MIMETYPE }; -static const char* kDragNDropActionSpecifiers [] = { + B_QUERY_TEMPLATE_MIMETYPE +}; +static const char* kDragNDropActionSpecifiers[] = { B_TRANSLATE_MARK("Create a Query"), - B_TRANSLATE_MARK("Create a Query template") }; + B_TRANSLATE_MARK("Create a Query template") +}; const uint32 kAttachFile = 'attf'; -static const int32 operators[] = { +const int32 operators[] = { B_CONTAINS, B_EQ, B_NE, @@ -118,7 +121,6 @@ static const int32 operators[] = { B_GE, B_LE }; - static const char* operatorLabels[] = { B_TRANSLATE_MARK("contains"), B_TRANSLATE_MARK("is"), @@ -954,7 +956,7 @@ FindPanel::ResizeMenuField(BMenuField* menuField) for (int32 index = menu->CountItems(); index-- > 0; ) { BMenuItem* item = menu->ItemAt(index); if (item->Label() != NULL) - width = max(width, StringWidth(item->Label())); + width = max_c(width, StringWidth(item->Label())); BMenu* submenu = item->Submenu(); if (submenu != NULL) { @@ -963,7 +965,7 @@ FindPanel::ResizeMenuField(BMenuField* menuField) if (subItem->Label() == NULL) continue; - width = max(width, menuField->StringWidth(subItem->Label())); + width = max_c(width, menuField->StringWidth(subItem->Label())); } } }