c++ - looking for macro which will replace function -


i dont know if name of topic introduces problem, thing is: in company code, there function, example:

float func_x(float a){       float b       return b } 

that function occuers in 1000 places. new function has been added:

void func_x2(void *a, void *b){      sth } 

this function should replace occuerences of func_x in code, change should happen (pseudocode):

float p = 123.33; float x = func_x(p)  to: float x; float p = 123.33; func_x2((void *)&p, (void*)&x); 

my question is: even possible write c macro (even sophisticated) replace func_x func_x2, code not change @ ? tried ?

regards j

you not replacing function's implementation it's signature. macro declaring variable surely lead errors because cannot declare variables @ every site can call functions.

the best way use editor's find , replace function, fixing case-by-case.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -