diff --git a/Source/Core/VideoBackends/D3DCommon/Shader.cpp b/Source/Core/VideoBackends/D3DCommon/Shader.cpp index 268f75370c..81d88c0968 100644 --- a/Source/Core/VideoBackends/D3DCommon/Shader.cpp +++ b/Source/Core/VideoBackends/D3DCommon/Shader.cpp @@ -132,9 +132,10 @@ bool Shader::CompileShader(D3D_FEATURE_LEVEL feature_level, BinaryData* out_byte AbstractShader::BinaryData Shader::CreateByteCode(const void* data, size_t length) { - BinaryData bytecode(length); - std::memcpy(bytecode.data(), data, length); - return bytecode; + const auto* const begin = static_cast(data); + const auto* const end = begin + length; + + return {begin, end}; } } // namespace D3DCommon