// Together with the assumption of no single Write() would ever be called on // an input with length greater-than-or-equal-to (max(size_t) / 2), this // guarantees no overflow of the check for remaining file capacity in Write(). // This does *not* apply to files with unlimited size. const size_t RtcEventLogOutputFile::kMaxReasonableFileSize =
std::numeric_limits<size_t>::max() / 2;
bool RtcEventLogOutputFile::Write(absl::string_view output) {
RTC_DCHECK(IsActiveInternal()); // No single write may be so big, that it would risk overflowing the // calculation of (written_bytes_ + output.length()).
RTC_DCHECK_LT(output.size(), kMaxReasonableFileSize);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.