Skip to content

Commit

Permalink
Fix gcc compile
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Jun 17, 2024
1 parent 37da365 commit 9b836c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/ripple/app/paths/Flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ flow(
}
}

using Var = std::variant<XRPAmount*, MPTAmount*, IOUAmount*>;
using Var =
std::variant<XRPAmount const*, MPTAmount const*, IOUAmount const*>;
auto getTypedAmt = [&](Asset const& iss) -> Var {
static auto xrp = XRPAmount{};
static auto cft = MPTAmount{};
Expand Down
7 changes: 5 additions & 2 deletions src/ripple/app/tx/impl/OfferStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ TOfferStreamBase<TIn, TOut>::step()
continue;
}

using Var = std::variant<XRPAmount*, IOUAmount*, MPTAmount*>;
using Var =
std::variant<XRPAmount const*, IOUAmount const*, MPTAmount const*>;
auto toTypedAmt = [&]<typename T>(T const& amt) -> Var {
static auto xrp = XRPAmount{};
static auto cft = MPTAmount{};
Expand All @@ -323,7 +324,9 @@ TOfferStreamBase<TIn, TOut>::step()
bool ret = false;
if constexpr (
!std::is_same_v<TIn, STAmount> &&
!std::is_same_v<TOut, STAmount>)
!std::is_same_v<TOut, STAmount> &&
!std::is_same_v<TIn, XRPAmount> &&
!std::is_same_v<TOut, XRPAmount>)
return shouldRmSmallIncreasedQOffer<TIn, TOut>();
else if constexpr (
std::is_same_v<TIn, STAmount> && std::is_same_v<TOut, STAmount>)
Expand Down

0 comments on commit 9b836c7

Please sign in to comment.