Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 1 | // Copyright 2018 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "testing/string_write_stream.h" |
Tom Sepez | 25f33d0 | 2021-01-29 01:58:51 +0000 | [diff] [blame] | 6 | |
Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 7 | #include "core/fxcrt/bytestring.h" |
| 8 | #include "core/fxcrt/widestring.h" |
Lei Zhang | 4582920 | 2021-04-16 16:42:11 +0000 | [diff] [blame] | 9 | #include "third_party/base/check_op.h" |
Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 10 | |
| 11 | StringWriteStream::StringWriteStream() = default; |
| 12 | |
| 13 | StringWriteStream::~StringWriteStream() = default; |
| 14 | |
Tom Sepez | f054191 | 2021-07-08 23:12:25 +0000 | [diff] [blame^] | 15 | bool StringWriteStream::WriteBlock(const void* pData, size_t size) { |
Dan Sinclair | 048afc6 | 2018-05-01 17:01:54 +0000 | [diff] [blame] | 16 | stream_.write(static_cast<const char*>(pData), size); |
| 17 | return true; |
| 18 | } |