I have some big code line which I want to pack into define for fast using.
EventManager::get_mutable_instance().get<EventManager::KeyEvent>("KeyPressed").Call(EventManager::KeyEvent::ArgsType(localEvent.Key));
Here is EventManager is singleton class. I’d prefer to pass into define only EventManager::KeyEvent type and signal name “KeyPressed”. Could you help me with this?
Due to the fact I don’t like defines I would make a “wrapper” function like this:
Edit:
An untested define could look like:
Edit2:
Im not really used to your code, but what would it more readable and debugable would be sth like this. (Be aware, the class names are not yours but I hope you can see what I mean)