MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / remove_line

Method remove_line

ogsr_engine/xrCore/Xr_ini.cpp:877–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

875void CInifile::w_bool(LPCSTR S, LPCSTR L, bool V) { w_string(S, L, V ? "true" : "false"); }
876
877void CInifile::remove_line(LPCSTR S, LPCSTR L)
878{
879 // R_ASSERT(!bReadOnly);
880
881 if (line_exist(S, L))
882 {
883 Sect& data = r_section(S);
884
885 auto A = data.Data.find(L);
886 R_ASSERT(A != data.Data.end());
887 data.Data.erase(A);
888
889 auto found = std::find_if(data.Ordered_Data.begin(), data.Ordered_Data.end(), [&](const auto& it) { return xr_strcmp(*it.first, L) == 0; });
890 R_ASSERT(found != data.Ordered_Data.end());
891 data.Ordered_Data.erase(found);
892 }
893}
894
895void CInifile::remove_section(LPCSTR S)
896{

Callers 2

process_vis_prefetchMethod · 0.80
update_pathMethod · 0.80

Calls 6

find_ifClass · 0.85
xr_strcmpFunction · 0.70
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected