Skip to content

Commit

Permalink
libgui|RowAtlasAllocator: Improved space allocation and optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 29, 2013
1 parent 82a092c commit 3c87f32
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doomsday/libgui/src/rowatlasallocator.cpp
Expand Up @@ -61,7 +61,7 @@ DENG2_PIMPL(RowAtlasAllocator)
}

// Move to the next row.
rover.x = 0;
rover.x = margin;
rover.y += rowHeight;

rect = Rectanglei::fromSize(rover, allocSize);
Expand Down Expand Up @@ -104,11 +104,11 @@ DENG2_PIMPL(RowAtlasAllocator)

// Sort descending.
bool operator < (ContentSize const &other) const {
if(width == other.width) {
// Secondary sorting by descending height.
return height > other.height;
if(height == other.height) {
// Secondary sorting by descending width.
return width > other.width;
}
return width > other.width;
return height > other.height;
}
};

Expand Down

0 comments on commit 3c87f32

Please sign in to comment.