Skip to content

Commit

Permalink
odm: pass booking parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Feb 20, 2025
1 parent dc19f80 commit fb604ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/motis/odm/prima.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ struct direct_ride {
};

struct capacities {
std::uint8_t wheelchairs_;
std::uint8_t bikes_;
std::uint8_t passengers_;
std::uint8_t luggage_;
std::int64_t wheelchairs_;
std::int64_t bikes_;
std::int64_t passengers_;
std::int64_t luggage_;
};

struct prima {
Expand Down
8 changes: 4 additions & 4 deletions src/odm/prima.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ void prima::init(api::Place const& from,
cap_ = {
.wheelchairs_ = static_cast<std::uint8_t>(
query.pedestrianProfile_ == api::PedestrianProfileEnum::WHEELCHAIR
? 1
: 0),
? 1U
: 0U),
.bikes_ = static_cast<std::uint8_t>(query.requireBikeTransport_ ? 1 : 0),
.passengers_ = 1U,
.luggage_ = 0U};
.passengers_ = query.passengers_.value_or(1U),
.luggage_ = query.luggage_.value_or(0U)};
}

std::int64_t to_millis(n::unixtime_t const t) {
Expand Down

0 comments on commit fb604ba

Please sign in to comment.