1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-18 12:09:10 +00:00

Fix #14362, 4b677e8256: Class with non static methods may have a default constructor (#14363)

This commit is contained in:
Loïc Guilloux
2025-06-14 23:39:22 +02:00
committed by GitHub
parent 1cd0391926
commit d0b56022d8
3 changed files with 57 additions and 2 deletions

View File

@@ -351,7 +351,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
else()
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.PreRegister(engine, \"${API_SUPER_CLS}\");")
endif()
if(DEFINED CLS_PARAMS AND NOT "${SUPER_CLS}" MATCHES "^ScriptEvent" AND NOT "${CLS}" STREQUAL "ScriptEvent")
if((DEFINED CLS_PARAMS OR DEFINED METHODS) AND NOT "${SUPER_CLS}" MATCHES "^ScriptEvent" AND NOT "${CLS}" STREQUAL "ScriptEvent")
if("${CLS_TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.AddSQAdvancedConstructor(engine);")
else()