From: Steve Brokenshire Date: Mon, 28 Dec 2015 01:57:22 +0000 (+0000) Subject: Replaced code for PREF in NICKNAME for ProcessIntegerValue. X-Git-Tag: release-0.09~202 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=036585fd672da03d7499799c14a4772f74bd6eee;p=xestiaab%2F.git Replaced code for PREF in NICKNAME for ProcessIntegerValue. --- diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index aadfb6a..3d408c9 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -1226,23 +1226,7 @@ void ContactDataObject::ProcessNickname(wxString PropertySeg1, wxString Property } 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){ - - NicknamesListPref->erase(*NicknameCount); - NicknamesListPref->insert(std::make_pair(*NicknameCount, PriorityNumber)); - - } + ProcessIntegerValue(this, NicknamesListPref, &PropertyValue, NicknameCount); } else if (PropertyName == wxT("LANGUAGE")){