- for (int i = 0; i < tmap->namesOfGroups.size(); i++) {
- if (tmap->namesOfGroups[i] != "xxx") {
- groups.push_back(tmap->namesOfGroups[i]);
+ vector<string> tGroups = tmap->getNamesOfGroups();
+ for (int i = 0; i < tGroups.size(); i++) {
+ if (tGroups[i] != "xxx") {
+ groups.push_back(tGroups[i]);