MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / DeserializePlaces

Method DeserializePlaces

external/ImGuiFileDialog/ImGuiFileDialog.cpp:3344–3361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3342}
3343
3344void IGFD::PlacesFeature::DeserializePlaces(const std::string& vPlaces) {
3345 if (!vPlaces.empty()) {
3346 const auto& groups = IGFD::Utils::SplitStringToVector(vPlaces, "###", false);
3347 if (groups.size() > 1) {
3348 for (size_t i = 0; i < groups.size(); i += 2) {
3349 auto group_ptr = GetPlacesGroupPtr(groups[i]);
3350 if (group_ptr != nullptr) {
3351 const auto& places = IGFD::Utils::SplitStringToVector(groups[i + 1], "##", false);
3352 if (places.size() > 1) {
3353 for (size_t j = 0; j < places.size(); j += 2) {
3354 group_ptr->AddPlace(places[j], places[j + 1], true); // was saved so we set canBeSaved to true
3355 }
3356 }
3357 }
3358 }
3359 }
3360 }
3361}
3362
3363bool IGFD::PlacesFeature::AddPlacesGroup(const std::string& vGroupName, const size_t& vDisplayOrder, const bool vCanBeEdited, const bool vOpenedByDefault) {
3364 if (vGroupName.empty()) {

Callers 1

IGFD_DeserializePlacesFunction · 0.80

Calls 3

AddPlaceMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected