clang-tidy: enable cmStrLen() check and fix violations

This commit is contained in:
Kyle Edwards
2022-10-17 14:28:48 -04:00
parent 43481a77f9
commit b4e8ddbc2f
2 changed files with 2 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ readability-*,\
-readability-redundant-member-init,\ -readability-redundant-member-init,\
-readability-suspicious-call-argument,\ -readability-suspicious-call-argument,\
-readability-uppercase-literal-suffix,\ -readability-uppercase-literal-suffix,\
cmake-*,\
" "
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$' HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
CheckOptions: CheckOptions:

View File

@@ -5532,7 +5532,7 @@ cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
} else if (cmHasLiteralPrefix(*location, "Resources/")) { } else if (cmHasLiteralPrefix(*location, "Resources/")) {
flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource; flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource;
if (stripResources) { if (stripResources) {
flags.MacFolder += strlen("Resources/"); flags.MacFolder += cmStrLen("Resources/");
} }
} else { } else {
flags.Type = cmGeneratorTarget::SourceFileTypeMacContent; flags.Type = cmGeneratorTarget::SourceFileTypeMacContent;