mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00

So that future CLs can de-inline its methods. We do this by asking the caller to allocate the buffer instead of having it as a data member. Bug: webrtc:8982 Change-Id: I246b0973e54510fdd880c3b6875336c31334d008 Reviewed-on: https://webrtc-review.googlesource.com/60000 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22355}
21 lines
641 B
C++
21 lines
641 B
C++
/*
|
|
* Copyright 2018 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "rtc_base/strings/string_builder.h"
|
|
|
|
namespace rtc {
|
|
|
|
SimpleStringBuilder::SimpleStringBuilder(rtc::ArrayView<char> buffer)
|
|
: buffer_(buffer) {
|
|
buffer_[0] = '\0';
|
|
RTC_DCHECK(IsConsistent());
|
|
}
|
|
|
|
} // namespace rtc
|