Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
util: update comments
  • Loading branch information
TimothyGu committed Feb 23, 2017
commit 0995c120bd54950b1754d9f0ad43620af76c7e06
4 changes: 2 additions & 2 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ class MaybeStackBuffer {
}

void SetLength(size_t length) {
// capacity_ stores how much memory was allocated.
// capacity() returns how much memory is actually available.
CHECK_LE(length, capacity());
length_ = length;
}

void SetLengthAndZeroTerminate(size_t length) {
// length_ stores how much memory was allocated.
// capacity() returns how much memory is actually available.
CHECK_LE(length + 1, capacity());
SetLength(length);

Expand Down