MCPcopy Create free account
hub / github.com/ZDoom/Raze / ParseOptionString

Function ParseOptionString

source/common/menu/menudef.cpp:891–913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889//=============================================================================
890
891static void ParseOptionString(FScanner &sc)
892{
893 FOptionValues *val = new FOptionValues;
894 sc.MustGetString();
895 FName optname = sc.String;
896 sc.MustGetStringName("{");
897 while (!sc.CheckString("}"))
898 {
899 FOptionValues::Pair &pair = val->mValues[val->mValues.Reserve(1)];
900 sc.MustGetString();
901 pair.Value = DBL_MAX;
902 pair.TextValue = sc.String;
903 sc.MustGetStringName(",");
904 sc.MustGetString();
905 pair.Text = strbin1(sc.String);
906 }
907 FOptionValues **pOld = OptionValues.CheckKey(optname);
908 if (pOld != nullptr && *pOld != nullptr)
909 {
910 delete *pOld;
911 }
912 OptionValues[optname] = val;
913}
914
915
916//=============================================================================

Callers 1

M_ParseMenuDefsFunction · 0.85

Calls 6

strbin1Function · 0.85
MustGetStringMethod · 0.80
MustGetStringNameMethod · 0.80
ReserveMethod · 0.80
CheckStringMethod · 0.45
CheckKeyMethod · 0.45

Tested by

no test coverage detected