Skip to content

Commit

Permalink
Merge branch 'develop' into apply-more-innerobj-templ-restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
scottschurr committed Jun 25, 2024
2 parents e39675f + ef02893 commit c6a0802
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ e2384885f5f630c8f0ffe4bf21a169b433a16858
241b9ddde9e11beb7480600fd5ed90e1ef109b21
760f16f56835663d9286bd29294d074de26a7ba6
0eebe6a5f4246fced516d52b83ec4e7f47373edd
2189cc950c0cebb89e4e2fa3b2d8817205bf7cef
b9d007813378ad0ff45660dc07285b823c7e9855
fe9a5365b8a52d4acc42eb27369247e6f238a4f9
9a93577314e6a8d4b4a8368cc9d2b15a5d8303e8
35 changes: 12 additions & 23 deletions include/xrpl/basics/Expected.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class [[nodiscard]] Expected

public:
template <typename U>
requires std::convertible_to<U, T> constexpr Expected(U&& r)
requires std::convertible_to<U, T> constexpr Expected(U && r)
: Base(T(std::forward<U>(r)))
{
}
Expand All @@ -148,32 +148,27 @@ class [[nodiscard]] Expected
{
}

constexpr bool
has_value() const
constexpr bool has_value() const
{
return Base::has_value();
}

constexpr T const&
value() const
constexpr T const& value() const
{
return Base::value();
}

constexpr T&
value()
constexpr T& value()
{
return Base::value();
}

constexpr E const&
error() const
constexpr E const& error() const
{
return Base::error();
}

constexpr E&
error()
constexpr E& error()
{
return Base::error();
}
Expand All @@ -186,26 +181,22 @@ class [[nodiscard]] Expected
// Add operator* and operator-> so the Expected API looks a bit more like
// what std::expected is likely to look like. See:
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0323r10.html
[[nodiscard]] constexpr T&
operator*()
[[nodiscard]] constexpr T& operator*()
{
return this->value();
}

[[nodiscard]] constexpr T const&
operator*() const
[[nodiscard]] constexpr T const& operator*() const
{
return this->value();
}

[[nodiscard]] constexpr T*
operator->()
[[nodiscard]] constexpr T* operator->()
{
return &this->value();
}

[[nodiscard]] constexpr T const*
operator->() const
[[nodiscard]] constexpr T const* operator->() const
{
return &this->value();
}
Expand Down Expand Up @@ -233,14 +224,12 @@ class [[nodiscard]] Expected<void, E>
{
}

constexpr E const&
error() const
constexpr E const& error() const
{
return Base::error();
}

constexpr E&
error()
constexpr E& error()
{
return Base::error();
}
Expand Down
2 changes: 1 addition & 1 deletion src/libxrpl/protocol/BuildInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace BuildInfo {
// and follow the format described at http://semver.org/
//------------------------------------------------------------------------------
// clang-format off
char const* const versionString = "2.2.0"
char const* const versionString = "2.3.0-b1"
// clang-format on

#if defined(DEBUG) || defined(SANITIZER)
Expand Down
3 changes: 1 addition & 2 deletions src/test/app/NFTokenBurn_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ class NFTokenBurnBaseUtil_test : public beast::unit_test::suite
// Otherwise either alice or minter can burn.
AcctStat& burner = owner.acct == becky.acct
? *(stats[acctDist(engine)])
: mintDist(engine) ? alice
: minter;
: mintDist(engine) ? alice : minter;

if (owner.acct == burner.acct)
env(token::burn(burner, nft));
Expand Down
3 changes: 2 additions & 1 deletion src/xrpld/app/misc/detail/ValidatorList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ ValidatorList::sendValidatorList(
beast::Journal j)
{
std::size_t const messageVersion =
peer.supportsFeature(ProtocolFeature::ValidatorList2Propagation) ? 2
peer.supportsFeature(ProtocolFeature::ValidatorList2Propagation)
? 2
: peer.supportsFeature(ProtocolFeature::ValidatorListPropagation) ? 1
: 0;
if (!messageVersion)
Expand Down
6 changes: 3 additions & 3 deletions src/xrpld/rpc/detail/ServerHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ logDuration(
beast::Journal& journal)
{
using namespace std::chrono_literals;
auto const level = (duration >= 10s) ? journal.error()
: (duration >= 1s) ? journal.warn()
: journal.debug();
auto const level = (duration >= 10s)
? journal.error()
: (duration >= 1s) ? journal.warn() : journal.debug();

JLOG(level) << "RPC request processing duration = "
<< std::chrono::duration_cast<std::chrono::microseconds>(
Expand Down

0 comments on commit c6a0802

Please sign in to comment.