lullaby/systems/render/detail/sort_order.cc
// Ensures the offset is within the valid range, logging if it's not.
Ensures the offset is within the valid range, logging if it's not.
Ensures the offset is within the valid range logging if it ' s not .
RenderSortOrderOffset CheckOffsetBounds(EntityIdPair entity_id_pair,
                                        RenderSortOrderOffset offset) {
  if (offset >= lull::RenderSortOrder::kMaxOffset) {
    LOG(INFO) << "Offset exceeds valid range for entity "
              << entity_id_pair.entity << " with id " << entity_id_pair.id
              << "! "
              << "Resetting to max offset.";
    return lull::RenderSortOrder::kMaxOffset;
  }
  if (offset <= -lull::RenderSortOrder::kMaxOffset) {
    LOG(INFO) << "Offset exceeds valid range for entity "
              << entity_id_pair.entity << " with id " << entity_id_pair.id
              << "! "
              << "Resetting to min offset.";
    return -lull::RenderSortOrder::kMaxOffset;
  }
  return offset;
}
RenderSortOrderOffset CheckOffsetBounds ( EntityIdPair entity_id_pair , RenderSortOrderOffset offset ) { if ( offset >= lull :: RenderSortOrder :: kMaxOffset ) { LOG ( INFO ) << " " << entity_id_pair . entity << " " << entity_id_pair . id << " " << " " ; return lull :: RenderSortOrder :: kMaxOffset ; } if ( offset <= - lull :: RenderSortOrder :: kMaxOffset ) { LOG ( INFO ) << " " << entity_id_pair . entity << " " << entity_id_pair . id << " " << " " ; return - lull :: RenderSortOrder :: kMaxOffset ; } return offset ; }
Ensures the offset is within the valid range, logging if it's not.
Ensures the offset is within the valid range logging if it ' s not .