I have a legacy c++ application and refactoring it step by step. I came across lots of typedef as below
typedef std::vector<class OrganisationData *> VECTP_ORDATA;
VECTP_ORDATA g_OrganisationData;
There are lots of free functions using on g_OrganisationData currently. What I feel is, previous developers should have made a class and made it more object based instead of free function spreaded everywhere.Currently I am in a process of grouping relevent functions together and make it as a static class around g_OrganisationData and call static functions whereever necessary.
Another option is grouping the function together under a single header file and use it. Is there any other best alternatives? Due to the nature of the code, I can't make changes step by step only.
Aucun commentaire:
Enregistrer un commentaire