GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Static Public Member Functions | List of all members
gd::EventsFunctionSelfCallChecker Class Reference

Check if functions are only calling themselves. More...

#include <EventsFunctionSelfCallChecker.h>

Static Public Member Functions

static bool IsFreeFunctionOnlyCallingItself (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsFunction &eventsFunction)
 Check if a free function is only calling itself.
 
static bool IsBehaviorFunctionOnlyCallingItself (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsBasedBehavior &eventsBasedBehavior, const gd::EventsFunction &eventsFunction)
 Check if a behavior function is only calling itself.
 
static bool IsObjectFunctionOnlyCallingItself (const gd::Project &project, const gd::EventsFunctionsExtension &eventsFunctionsExtension, const gd::EventsBasedObject &eventsBasedObject, const gd::EventsFunction &eventsFunction)
 Check if an object function is only calling itself.
 

Detailed Description

Check if functions are only calling themselves.

It allows to detect mistakes when implementing functions for compatibility after a function renaming. Infinite loops can happens when the legacy function call itself instead of the new function.

Note
Only the first instruction or the expressions of the first action is checked.

The documentation for this class was generated from the following files: