MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / loadContainers

Method loadContainers

source/ui/data/boxedwineData.cpp:197–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void BoxedwineData::loadContainers() {
198 for (auto &container : BoxedwineData::containers) {
199 delete container;
200 }
201 BoxedwineData::containers.clear();
202 Fs::iterateAllNativeFiles(GlobalSettings::getContainerFolder(), false, true, [] (BString filepath, bool isDir)->U32 {
203 if (isDir) {
204 BoxedContainer* container = new BoxedContainer();
205 if (container->load(filepath)) {
206 BoxedwineData::containers.push_back(container);
207 } else {
208 delete container;
209 }
210 }
211 return 0;
212 });
213 BoxedwineData::sortContainers();
214}
215
216void BoxedwineData::loadUI() {
217 loadContainers();

Callers

nothing calls this directly

Calls 3

clearMethod · 0.45
loadMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected