Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions groups/bdl/bdlt/bdlt_datetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,19 @@ bsl::ostream& Datetime::print(bsl::ostream& stream,
return stream;
}

bool Datetime::validateAndTraceLogRepresentation() const
{
if (BSLS_PERFORMANCEHINT_PREDICT_LIKELY(k_REP_MASK <= d_value)) {
return true; // RETURN
}
BSLS_ASSERT_SAFE(
0 && "detected invalid 'bdlt::Datetime'; see TEAM 579660115");
BSLS_REVIEW_INVOKE(
"detected invalid 'bdlt::Datetime'; see TEAM 579660115");

return false;
}

int Datetime::printToBuffer(char *result,
int numBytes,
int fractionalSecondPrecision) const
Expand Down
14 changes: 0 additions & 14 deletions groups/bdl/bdlt/bdlt_datetime.h
Original file line number Diff line number Diff line change
Expand Up @@ -1125,20 +1125,6 @@ bsls::Types::Uint64 Datetime::updatedRepresentation() const
| k_REP_MASK;
}

inline
bool Datetime::validateAndTraceLogRepresentation() const
{
if (BSLS_PERFORMANCEHINT_PREDICT_LIKELY(k_REP_MASK <= d_value)) {
return true; // RETURN
}
BSLS_ASSERT_SAFE(
0 && "detected invalid 'bdlt::Datetime'; see TEAM 579660115");
BSLS_REVIEW_INVOKE(
"detected invalid 'bdlt::Datetime'; see TEAM 579660115");

return false;
}

// CLASS METHODS
inline
bool Datetime::isValid(int year,
Expand Down