1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed some MSVC warnings in Grid

This commit is contained in:
ed 2019-08-30 21:04:39 +01:00
parent fab1442ceb
commit f1d3ac227f
2 changed files with 8 additions and 8 deletions

View file

@ -920,10 +920,10 @@ struct Grid::BoxAlignment
if (item.width != (float) GridItem::notAssigned) r.setWidth (item.width);
if (item.height != (float) GridItem::notAssigned) r.setHeight (item.height);
if (item.maxWidth != GridItem::notAssigned) r.setWidth (jmin (item.maxWidth, r.getWidth()));
if (item.minWidth != GridItem::notAssigned) r.setWidth (jmax (item.minWidth, r.getWidth()));
if (item.maxHeight != GridItem::notAssigned) r.setHeight (jmin (item.maxHeight, r.getHeight()));
if (item.minHeight != GridItem::notAssigned) r.setHeight (jmax (item.minHeight, r.getHeight()));
if (item.maxWidth != (float) GridItem::notAssigned) r.setWidth (jmin (item.maxWidth, r.getWidth()));
if (item.minWidth > 0.0f) r.setWidth (jmax (item.minWidth, r.getWidth()));
if (item.maxHeight != (float) GridItem::notAssigned) r.setHeight (jmin (item.maxHeight, r.getHeight()));
if (item.minHeight > 0.0f) r.setHeight (jmax (item.minHeight, r.getHeight()));
if (alignType == Grid::AlignItems::start && justifyType == Grid::JustifyItems::start)
return r;

View file

@ -174,12 +174,12 @@ public:
};
/* TODO: move all of this into a common class that is shared with the FlexItem */
float width = notAssigned;
float minWidth = 0;
float width = notAssigned;
float minWidth = 0.0f;
float maxWidth = notAssigned;
float height = notAssigned;
float minHeight = 0;
float height = notAssigned;
float minHeight = 0.0f;
float maxHeight = notAssigned;
/** Represents a margin. */