| // Copyright 2022 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifdef UNSAFE_BUFFERS_BUILD |
| // TODO(crbug.com/390223051): Remove C-library calls to fix the errors. |
| #pragma allow_unsafe_libc_calls |
| #include "ui/qt/qt_interface.h" |
| String::String() = default; |
| String::String(const char* str) { |
| String::String(String&& other) { |
| String& String::operator=(String&& other) { |
| Buffer::Buffer() = default; |
| Buffer::Buffer(const uint8_t* data, size_t size) |
| : data_(static_cast<uint8_t*>(malloc(size))), size_(size) { |
| memcpy(data_, data, size); |
| Buffer::Buffer(Buffer&& other) { |
| Buffer& Buffer::operator=(Buffer&& other) { |
| uint8_t* Buffer::Take() { |