webrtc/rtc_base/strings/string_builder.cc
Karl Wiberg 881f16891b Make SimpleStringBuilder into a non-template
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}
2018-03-09 11:32:34 +00:00

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