} else if (PropertyName == wxT("PREF")){
- int PriorityNumber = 0;
- bool ValidNumber = TRUE;
-
- try{
- PriorityNumber = std::stoi(PropertyValue.ToStdString());
- }
-
- catch(std::invalid_argument &e){
- ValidNumber = FALSE;
- }
-
- if (ValidNumber == TRUE){
+ ProcessIntegerValue(this, &SourceListPref, &PropertyValue, SourceCount);
- SourceListPref.erase(*SourceCount);
- SourceListPref.insert(std::make_pair(*SourceCount, PriorityNumber));
-
- }
-
} else if (PropertyName == wxT("MEDIATYPE")){
SourceListMediatype.erase(*SourceCount);
}
void ProcessIntegerValue(ContactDataObject *ContactData,
- std::map<int,int> *KeyListPref,
+ std::map<int,int> *PrefPtr,
wxString *PropertyValue,
- int *KeyCount){
+ int *ItemCount){
int PriorityNumber = 0;
bool ValidNumber = TRUE;
if (ValidNumber == TRUE){
- KeyListPref->erase(*KeyCount);
- KeyListPref->insert(std::make_pair(*KeyCount, PriorityNumber));
+ PrefPtr->erase(*ItemCount);
+ PrefPtr->insert(std::make_pair(*ItemCount, PriorityNumber));
}
PropertyType *intType);
void ProcessIntegerValue(ContactDataObject *ContactData,
- std::map<int,int> *KeyListPref,
+ std::map<int,int> *PrefPtr,
wxString *PropertyValue,
- int *KeyCount);
+ int *ItemCount);
#endif
\ No newline at end of file