@@ -33,32 +33,32 @@ bool RootSignatureParser::parse() {
33
33
auto Flags = parseRootFlags ();
34
34
if (!Flags.has_value ())
35
35
return true ;
36
- Elements.emplace_back (RootSignatureElement ( ElementLoc, *Flags) );
36
+ Elements.emplace_back (ElementLoc, *Flags);
37
37
} else if (tryConsumeExpectedToken (TokenKind::kw_RootConstants)) {
38
38
SourceLocation ElementLoc = getTokenLocation (CurToken);
39
39
auto Constants = parseRootConstants ();
40
40
if (!Constants.has_value ())
41
41
return true ;
42
- Elements.emplace_back (RootSignatureElement ( ElementLoc, *Constants) );
42
+ Elements.emplace_back (ElementLoc, *Constants);
43
43
} else if (tryConsumeExpectedToken (TokenKind::kw_DescriptorTable)) {
44
44
SourceLocation ElementLoc = getTokenLocation (CurToken);
45
45
auto Table = parseDescriptorTable ();
46
46
if (!Table.has_value ())
47
47
return true ;
48
- Elements.emplace_back (RootSignatureElement ( ElementLoc, *Table) );
48
+ Elements.emplace_back (ElementLoc, *Table);
49
49
} else if (tryConsumeExpectedToken (
50
50
{TokenKind::kw_CBV, TokenKind::kw_SRV, TokenKind::kw_UAV})) {
51
51
SourceLocation ElementLoc = getTokenLocation (CurToken);
52
52
auto Descriptor = parseRootDescriptor ();
53
53
if (!Descriptor.has_value ())
54
54
return true ;
55
- Elements.emplace_back (RootSignatureElement ( ElementLoc, *Descriptor) );
55
+ Elements.emplace_back (ElementLoc, *Descriptor);
56
56
} else if (tryConsumeExpectedToken (TokenKind::kw_StaticSampler)) {
57
57
SourceLocation ElementLoc = getTokenLocation (CurToken);
58
58
auto Sampler = parseStaticSampler ();
59
59
if (!Sampler.has_value ())
60
60
return true ;
61
- Elements.emplace_back (RootSignatureElement ( ElementLoc, *Sampler) );
61
+ Elements.emplace_back (ElementLoc, *Sampler);
62
62
}
63
63
64
64
// ',' denotes another element, otherwise, expected to be at end of stream
@@ -254,7 +254,7 @@ std::optional<DescriptorTable> RootSignatureParser::parseDescriptorTable() {
254
254
auto Clause = parseDescriptorTableClause ();
255
255
if (!Clause.has_value ())
256
256
return std::nullopt;
257
- Elements.emplace_back (RootSignatureElement ( ElementLoc, *Clause) );
257
+ Elements.emplace_back (ElementLoc, *Clause);
258
258
Table.NumClauses ++;
259
259
} else if (tryConsumeExpectedToken (TokenKind::kw_visibility)) {
260
260
// visibility = SHADER_VISIBILITY
0 commit comments