MCPcopy Create free account
hub / github.com/alecazam/kram / CheckTypeCast

Method CheckTypeCast

hlslparser/src/HLSLParser.cpp:2640–2649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2638}*/
2639
2640bool HLSLParser::CheckTypeCast(const HLSLType& srcType, const HLSLType& dstType)
2641{
2642 if (GetTypeCastRank(m_tree, srcType, dstType) == -1) {
2643 const char* srcTypeName = GetTypeNameHLSL(srcType);
2644 const char* dstTypeName = GetTypeNameHLSL(dstType);
2645 m_tokenizer.Error("Cannot implicitly convert from '%s' to '%s'", srcTypeName, dstTypeName);
2646 return false;
2647 }
2648 return true;
2649}
2650
2651bool HLSLParser::ParseExpression(HLSLExpression*& expression)
2652{

Callers

nothing calls this directly

Calls 3

GetTypeCastRankFunction · 0.85
GetTypeNameHLSLFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected