Skip to content

Commit

Permalink
Fix warning about using bitwise and instead of logical and
Browse files Browse the repository at this point in the history
  • Loading branch information
seelabs committed Apr 29, 2022
1 parent 7c66747 commit 057329b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ripple/app/tx/impl/CreateOffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ CreateOffer::flowCross(
// additional path with XRP as the intermediate between two books.
// This second path we have to build ourselves.
STPathSet paths;
if (!takerAmount.in.native() & !takerAmount.out.native())
if (!takerAmount.in.native() && !takerAmount.out.native())
{
STPath path;
path.emplace_back(std::nullopt, xrpCurrency(), std::nullopt);
Expand Down

1 comment on commit 057329b

@greg7mdp
Copy link

@greg7mdp greg7mdp commented on 057329b May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably doesn't matter here and was not intentional, but the bitwise and might be faster because it is branchless.

Please sign in to comment.