struct A;
struct B {
struct A* A;
};
struct C {
struct A* A;
};
dpp would only rename one of the fields (either the one in B or in C), because the _fieldDeclarations associative array overwrites the already existing (if any) line number with a new one. So it would rename only the field which is contained in the last processed struct.
My solution is changing the value of the associative array from LineNumber to LineNumber[], so that dpp knows of all instances where the field should be renamed.
Also made fixFields correctly rename the accessor functions' name and the field that the accessor functions try to access.
Previously, for this case
dpp would only rename one of the fields (either the one in B or in C), because the _fieldDeclarations associative array overwrites the already existing (if any) line number with a new one. So it would rename only the field which is contained in the last processed struct.
My solution is changing the value of the associative array from LineNumber to LineNumber[], so that dpp knows of all instances where the field should be renamed.
Also made fixFields correctly rename the accessor functions' name and the field that the accessor functions try to access.