aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/scratch_buffer.h6
-rw-r--r--src/common/uuid.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/common/scratch_buffer.h b/src/common/scratch_buffer.h
index 2a98cda539..8c1f566301 100644
--- a/src/common/scratch_buffer.h
+++ b/src/common/scratch_buffer.h
@@ -1,9 +1,13 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <iterator>
+#include <cstring>
#include "common/make_unique_for_overwrite.h"
@@ -61,7 +65,7 @@ public:
void resize(size_type size) {
if (size > buffer_capacity) {
auto new_buffer = Common::make_unique_for_overwrite<T[]>(size);
- std::move(buffer.get(), buffer.get() + buffer_capacity, new_buffer.get());
+ std::memcpy(new_buffer.get(), buffer.get(), buffer_capacity * sizeof(T));
buffer = std::move(new_buffer);
buffer_capacity = size;
}
diff --git a/src/common/uuid.h b/src/common/uuid.h
index c3cbd7b479..3aa3212dd7 100644
--- a/src/common/uuid.h
+++ b/src/common/uuid.h
@@ -10,6 +10,7 @@
#include <functional>
#include <span>
#include <string>
+#include <type_traits>
#include "common/common_types.h"