src/third_party/abseil-cpp/absl/strings/cord.cc
static CordRep* RingNewTree(const char* data, size_t length,
                            size_t alloc_hint) {
  if (length <= kMaxFlatLength) {
    return CreateFlat(data, length, alloc_hint);
  }
  CordRepFlat* flat = CreateFlat(data, kMaxFlatLength, 0);
  data += kMaxFlatLength;
  length -= kMaxFlatLength;
  size_t extra = (length - 1) / kMaxFlatLength + 1;
  auto* root = CordRepRing::Create(flat, extra);
  return CordRepRing::Append(root, {data, length}, alloc_hint);
}
// Creates a new flat or ringbuffer out of the specified array.
// The returned node has a refcount of 1.
Creates a new flat or ringbuffer out of the specified array.
The returned node has a refcount of 1.
Creates a new flat or ringbuffer out of the specified array . The returned node has a refcount of 1 .
static CordRep* RingNewTree(const char* data, size_t length,
                            size_t alloc_hint) {
  if (length <= kMaxFlatLength) {
    return CreateFlat(data, length, alloc_hint);
  }
  CordRepFlat* flat = CreateFlat(data, kMaxFlatLength, 0);
  data += kMaxFlatLength;
  length -= kMaxFlatLength;
  size_t extra = (length - 1) / kMaxFlatLength + 1;
  auto* root = CordRepRing::Create(flat, extra);
  return CordRepRing::Append(root, {data, length}, alloc_hint);
}
static CordRep * RingNewTree ( const char * data , size_t length , size_t alloc_hint ) { if ( length <= kMaxFlatLength ) { return CreateFlat ( data , length , alloc_hint ) ; } CordRepFlat * flat = CreateFlat ( data , kMaxFlatLength , 0 ) ; data += kMaxFlatLength ; length -= kMaxFlatLength ; size_t extra = ( length - 1 ) / kMaxFlatLength + 1 ; auto * root = CordRepRing :: Create ( flat , extra ) ; return CordRepRing :: Append ( root , { data , length } , alloc_hint ) ; }
Creates a new flat or ringbuffer out of the specified array.
Creates a new flat or ringbuffer out of the specified array .