* Loads all items from a 'grpname' section into a list * The list parameter can be a nullptr pointer, in this case nothing will be * saved and a callback function should be defined that will take over the * list-handling and store the data itself somewhere. * @param ini IniFile handle to the ini file with the source data * @param grpname character string identifying the section-header of the
| 833 | * @param list new list with entries of the given section |
| 834 | */ |
| 835 | static void IniLoadSettingList(IniFile &ini, std::string_view grpname, StringList &list) |
| 836 | { |
| 837 | const IniGroup *group = ini.GetGroup(grpname); |
| 838 | |
| 839 | if (group == nullptr) return; |
| 840 | |
| 841 | list.clear(); |
| 842 | |
| 843 | for (const IniItem &item : group->items) { |
| 844 | if (!item.name.empty()) list.push_back(item.name); |
| 845 | } |
| 846 | } |
| 847 | |
| 848 | /** |
| 849 | * Saves all items from a list into the 'grpname' section |