Skip to content

Commit

Permalink
Cross platform float max
Browse files Browse the repository at this point in the history
  • Loading branch information
luky1971 committed Jul 17, 2018
1 parent eb3b26d commit 3353b60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ios-project/Diamond/Diamond.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BITCODE_GENERATION_MODE = marker;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down Expand Up @@ -487,6 +488,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BITCODE_GENERATION_MODE = bitcode;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down
4 changes: 2 additions & 2 deletions src/graphics/D_UIView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ void Diamond::UIView::updateLayout() {
}

if ((m_props.flags & UIViewProps::FIT_CONTENTS) && !m_children.empty()) {
tD_pos minx = FLT_MAX, miny = FLT_MAX;
tD_pos maxx = -FLT_MAX, maxy = -FLT_MAX;
tD_pos minx = std::numeric_limits<float>::max(), miny = std::numeric_limits<float>::max();
tD_pos maxx = -std::numeric_limits<float>::max(), maxy = -std::numeric_limits<float>::max();

for (auto child : m_children) {
if (child->isActive()) {
Expand Down

0 comments on commit 3353b60

Please sign in to comment.