MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / DeserializePlaces

Method DeserializePlaces

ImGuiFileDialog.cpp:3282–3299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3280}
3281
3282void IGFD::PlacesFeature::DeserializePlaces(const std::string& vPlaces) {
3283 if (!vPlaces.empty()) {
3284 const auto& groups = IGFD::Utils::SplitStringToVector(vPlaces, "###", false);
3285 if (groups.size() > 1) {
3286 for (size_t i = 0; i < groups.size(); i += 2) {
3287 auto group_ptr = GetPlacesGroupPtr(groups[i]);
3288 if (group_ptr != nullptr) {
3289 const auto& places = IGFD::Utils::SplitStringToVector(groups[i + 1], "##", false);
3290 if (places.size() > 1) {
3291 for (size_t j = 0; j < places.size(); j += 2) {
3292 group_ptr->AddPlace(places[j], places[j + 1], true); // was saved so we set canBeSaved to true
3293 }
3294 }
3295 }
3296 }
3297 }
3298 }
3299}
3300
3301bool IGFD::PlacesFeature::AddPlacesGroup(const std::string& vGroupName, const size_t& vDisplayOrder, const bool vCanBeEdited, const bool vOpenedByDefault) {
3302 if (vGroupName.empty()) {

Callers 1

IGFD_DeserializePlacesFunction · 0.80

Calls 3

emptyMethod · 0.80
sizeMethod · 0.80
AddPlaceMethod · 0.80

Tested by

no test coverage detected