Browse Source

Fixed some MSVC warnings in Grid

tags/2021-05-28
ed 5 years ago
parent
commit
f1d3ac227f
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      modules/juce_gui_basics/layout/juce_Grid.cpp
  2. +4
    -4
      modules/juce_gui_basics/layout/juce_GridItem.h

+ 4
- 4
modules/juce_gui_basics/layout/juce_Grid.cpp 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;


+ 4
- 4
modules/juce_gui_basics/layout/juce_GridItem.h 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. */


Loading…
Cancel
Save