From 5d6277a1b4af590329f694d988780704bfcf2d9a Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Mon, 28 Dec 2015 02:03:54 +0000 Subject: [PATCH] Replaced PREF code in EMAIL with ProcessIntegerValue. --- source/contacteditor/ContactDataObject.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index f842c04..607f28c 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -2183,23 +2183,7 @@ void ContactDataObject::ProcessEmail(wxString PropertySeg1, wxString PropertySeg } 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){ - - EmailListPref->erase(*EmailCount); - EmailListPref->insert(std::make_pair(*EmailCount, PriorityNumber)); - - } + ProcessIntegerValue(this, EmailListPref, &PropertyValue, EmailCount); } else { -- 2.39.5