你好您好!有什么可以帮到您呢?能否将此代码进行#define 封装float old_Attack_Speedvoid instance; float get_Attack_Speedvoid instance if instance == NULL AssignmentAttack_Speed = 1 return old_Attack_Speedinstance; return flo
#define封装可以这样写:
#define get_Attack_Speed(instance)
((instance == NULL || Assignment.Attack_Speed <= 1) ? old_Attack_Speed(instance) : (float)Assignment.Attack_Speed)
这样就可以直接使用get_Attack_Speed宏来代替原来的函数调用了。
原文地址: https://www.cveoy.top/t/topic/bVgb 著作权归作者所有。请勿转载和采集!