Files
rippled/src/libxrpl/protocol/Book.cpp
Ayaz Salikhov 5f638f5553 chore: Set ColumnLimit to 120 in clang-format (#6288)
This change updates the ColumnLimit from 80 to 120, and applies clang-format to reformat the code.
2026-01-28 18:09:50 +00:00

35 lines
560 B
C++

#include <xrpl/protocol/Book.h>
#include <xrpl/protocol/Issue.h>
#include <ostream>
#include <string>
namespace xrpl {
bool
isConsistent(Book const& book)
{
return isConsistent(book.in) && isConsistent(book.out) && book.in != book.out;
}
std::string
to_string(Book const& book)
{
return to_string(book.in) + "->" + to_string(book.out);
}
std::ostream&
operator<<(std::ostream& os, Book const& x)
{
os << to_string(x);
return os;
}
Book
reversed(Book const& book)
{
return Book(book.out, book.in, book.domain);
}
} // namespace xrpl