diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/core/slang-type-text-util.h | 2 | ||||
| -rw-r--r-- | source/slang/slang-type-layout.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/core/slang-type-text-util.h b/source/core/slang-type-text-util.h index cf146fb46..219dcd5f2 100644 --- a/source/core/slang-type-text-util.h +++ b/source/core/slang-type-text-util.h @@ -25,7 +25,7 @@ struct TypeTextUtil SlangCompileTarget target; ///< The target const char* extensions; ///< Comma delimited list of extensions associated with the target const char* names; ///< Comma delimited list of names associated with the target. NOTE! First name is taken as the normal display name. - const char* description; ///< Description, can be null + const char* description = nullptr; ///< Description, can be null }; /// Get the compile target infos diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp index 79236fc48..c7b9af40b 100644 --- a/source/slang/slang-type-layout.cpp +++ b/source/slang/slang-type-layout.cpp @@ -3720,7 +3720,7 @@ static TypeLayoutResult _createTypeLayout( // If the field has an explicit offset, then we will // use that to place it. // - if (auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>()) + if (const auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>()) { TypeLayoutResult fieldResult = _createTypeLayout( context, @@ -3733,7 +3733,7 @@ static TypeLayoutResult _createTypeLayout( } for (auto field : getFields(structDeclRef, MemberFilterStyle::Instance)) { - if (auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>()) + if (const auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>()) continue; // The fields of a `struct` type may include existential (interface) |
