From 0981e67bce17d876f67e6b5a53f8ae7ef3f76e9a Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 6 Oct 2023 11:52:25 -0700 Subject: [PATCH] MemoryShaderSourceFileInfo: added convenience constructor that takes std::string --- .../GraphicsTools/interface/ShaderSourceFactoryUtils.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Graphics/GraphicsTools/interface/ShaderSourceFactoryUtils.h b/Graphics/GraphicsTools/interface/ShaderSourceFactoryUtils.h index add42d923..26fd3c8fd 100644 --- a/Graphics/GraphicsTools/interface/ShaderSourceFactoryUtils.h +++ b/Graphics/GraphicsTools/interface/ShaderSourceFactoryUtils.h @@ -130,6 +130,14 @@ struct MemoryShaderSourceFileInfo pData{_pData}, Length{_Length} {} + + MemoryShaderSourceFileInfo(const Char* _Name, + const String& Data) noexcept : + Name{_Name}, + pData{Data.c_str()}, + Length{static_cast(Data.length())} + {} + #endif }; typedef struct MemoryShaderSourceFileInfo MemoryShaderSourceFileInfo;