LayoutUtils: Use std::max instead of max_c

This commit is contained in:
John Scipione
2014-04-08 14:10:09 -04:00
parent 04b48a29bd
commit 6ecc270f57
+2 -1
View File
@@ -5,6 +5,7 @@
#include <LayoutUtils.h> #include <LayoutUtils.h>
#include <algorithm>
#include <typeinfo> #include <typeinfo>
#include <Layout.h> #include <Layout.h>
@@ -191,7 +192,7 @@ BLayoutUtils::AlignInFrame(BView* view, BRect frame)
float preferredHeight; float preferredHeight;
view->GetHeightForWidth(frame.Width(), &minHeight, &maxHeight, view->GetHeightForWidth(frame.Width(), &minHeight, &maxHeight,
&preferredHeight); &preferredHeight);
frame.bottom = frame.top + max_c(frame.Height(), minHeight); frame.bottom = frame.top + std::max(frame.Height(), minHeight);
maxSize.height = minHeight; maxSize.height = minHeight;
} }
frame = AlignInFrame(frame, maxSize, alignment); frame = AlignInFrame(frame, maxSize, alignment);