MSL: Fix another warning on potentially uninitialized.
This commit is contained in:
parent
85a78324ef
commit
f3a75d1d4b
@ -16705,7 +16705,7 @@ void CompilerMSL::cast_from_variable_load(uint32_t source_id, std::string &expr,
|
||||
bool is_packed = has_extended_decoration(source_id, SPIRVCrossDecorationPhysicalTypePacked);
|
||||
auto *source_expr = maybe_get<SPIRExpression>(source_id);
|
||||
auto *var = maybe_get_backing_variable(source_id);
|
||||
const SPIRType *var_type, *phys_type;
|
||||
const SPIRType *var_type = nullptr, *phys_type = nullptr;
|
||||
if (uint32_t phys_id = get_extended_decoration(source_id, SPIRVCrossDecorationPhysicalTypeID))
|
||||
phys_type = &get<SPIRType>(phys_id);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user