LayoutUtils: Use std::max instead of max_c
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user