From e1c02cc146a0e0ccb2b2e25d0068237a8c1bae6b Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 7 Oct 2021 15:32:57 -0500 Subject: [PATCH] Updated cpp file extension check per PR feedback. Signed-off-by: Chris Galvan --- scripts/o3de/o3de/engine_template.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/o3de/o3de/engine_template.py b/scripts/o3de/o3de/engine_template.py index 06fab8752e..cba7539aaa 100755 --- a/scripts/o3de/o3de/engine_template.py +++ b/scripts/o3de/o3de/engine_template.py @@ -59,6 +59,14 @@ binary_file_ext = { '.motionset' } +cpp_file_ext = { + '.cpp', + '.h', + '.hpp', + '.hxx', + '.inl' +} + expect_license_info_ext = { '.cpp', '.h', @@ -530,7 +538,7 @@ def create_template(source_path: pathlib.Path, """ name, ext = os.path.splitext(file_path) - return ext == ".h" or ext == ".hpp" or ext == ".inl" or ext == ".cpp" or ext == ".hxx" + return ext.lower() in cpp_file_ext def _transform_into_template(s_data: object, prefer_sanitized_name: bool = False) -> (bool, str):