mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
semantic::Function: Clean up ReferencedXXX() return types
Use a type alias for the most common and lengthy return type. Drop the `const` from the return type - it is (or at least should be) meaningless. Fix `auto& referenced_variables =` local variable declaration in inspector.cc. You cannot take a reference to a non-ref return value of a function. I have no idea why the compiler wasn't erroring about this. Change-Id: Icc0b4a9bf4b4c9d03b44670eda27214ef04ad41c Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/42021 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
3a9a55eec6
commit
1d5a7eb82f
@@ -412,7 +412,7 @@ std::vector<ResourceBinding> Inspector::GetSampledTextureResourceBindingsImpl(
|
||||
|
||||
std::vector<ResourceBinding> result;
|
||||
auto* func_sem = program_->Sem().Get(func);
|
||||
auto& referenced_variables =
|
||||
auto referenced_variables =
|
||||
multisampled_only ? func_sem->ReferencedMultisampledTextureVariables()
|
||||
: func_sem->ReferencedSampledTextureVariables();
|
||||
for (auto& ref : referenced_variables) {
|
||||
|
||||
Reference in New Issue
Block a user