Skip to content

Commit

Permalink
MemoryShaderSourceFileInfo: added convenience constructor that takes …
Browse files Browse the repository at this point in the history
…std::string
  • Loading branch information
TheMostDiligent committed Oct 6, 2023
1 parent ca3908f commit 0981e67
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Graphics/GraphicsTools/interface/ShaderSourceFactoryUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Uint32>(Data.length())}
{}

#endif
};
typedef struct MemoryShaderSourceFileInfo MemoryShaderSourceFileInfo;
Expand Down

0 comments on commit 0981e67

Please sign in to comment.