Skip to content

Commit 1ff964a

Browse files
committed
Fix issues
Signed-off-by: JCW <[email protected]>
1 parent 8025cfa commit 1ff964a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

include/xrpl/beast/utility/Journal.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,15 @@ class Journal
458458
Journal(
459459
Journal const& other,
460460
std::optional<JsonLogAttributes> attributes = std::nullopt)
461-
: m_sink(other.m_sink)
461+
: m_attributes(other.m_attributes)
462+
, m_sink(other.m_sink)
462463
{
463464
if (attributes.has_value())
464-
m_attributes = std::move(attributes.value());
465-
if (other.m_attributes.has_value())
466465
{
467-
if (m_attributes.has_value())
468-
m_attributes->combine(
469-
other.m_attributes->contextValues_);
466+
if (m_attributes)
467+
m_attributes->combine(attributes->contextValues_);
470468
else
471-
m_attributes = other.m_attributes;
469+
m_attributes = std::move(attributes);
472470
}
473471
}
474472
/** Create a journal that writes to the specified sink. */

0 commit comments

Comments
 (0)