summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3DCommon/Shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/D3DCommon/Shader.cpp')
-rw-r--r--Source/Core/VideoBackends/D3DCommon/Shader.cpp7
1 files changed, 4 insertions, 3 deletions
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<const u8*>(data);
+ const auto* const end = begin + length;
+
+ return {begin, end};
}
} // namespace D3DCommon