mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
shader_ir: std::move node within DeclareAmend()
Same behavior, but elides an unnecessary atomic reference count increment and decrement.
This commit is contained in:
parent
8a00a0ade6
commit
7234f436aa
1 changed files with 2 additions and 2 deletions
|
@ -452,8 +452,8 @@ void ShaderIR::MarkAttributeUsage(Attribute::Index index, u64 element) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t ShaderIR::DeclareAmend(Node new_amend) {
|
std::size_t ShaderIR::DeclareAmend(Node new_amend) {
|
||||||
const std::size_t id = amend_code.size();
|
const auto id = amend_code.size();
|
||||||
amend_code.push_back(new_amend);
|
amend_code.push_back(std::move(new_amend));
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue