}
intPrevValue = 4;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
CaptureString(&PropertyValue, FALSE);
- if (PropertyName == wxT("ALTID")){
-
- WebsiteListAltID->erase(*URLCount);
- WebsiteListAltID->insert(std::make_pair(*URLCount, PropertyValue));
+ ProcessStringValue(&PropertyName, "ALTID", WebsiteListAltID, &PropertyValue, URLCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", WebsiteListPID, &PropertyValue, URLCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "MEDIATYPE", WebsiteListMediatype, &PropertyValue, URLCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", WebsiteListPref, &PropertyValue, URLCount, &PropertyMatched);
- } else if (PropertyName == wxT("PID")){
-
- WebsiteListPID->erase(*URLCount);
- WebsiteListPID->insert(std::make_pair(*URLCount, PropertyValue));
-
- } else if (PropertyName == wxT("PREF")){
-
- ProcessIntegerValue(WebsiteListPref, &PropertyValue, URLCount);
-
- } else if (PropertyName == wxT("MEDIATYPE")){
+ if (PropertyMatched == TRUE){
- WebsiteListMediatype->erase(*URLCount);
- WebsiteListMediatype->insert(std::make_pair(*URLCount, PropertyValue));
+ PropertyMatched = FALSE;
+ continue;
- } else {
+ }
- // Something else we don't know about so append
- // to the tokens variable.
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+
+ if (FirstToken == TRUE){
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ } else {
- }
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
+ }
+
}
}