From ef88cb6ff0f51060b35249b7bf2e83a73e0795b8 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 23 Feb 2001 17:20:28 +0000 Subject: [PATCH] use size_type rather than int git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1613 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 4 ++++ src/frontends/xforms/FormPreferences.C | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index c68efe4e1c..9b6458d73e 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2001-02-23 Angus Leeming + + * FormPreferences(GetFrom, GetTo): use size_type rather than int. + 2001-02-23 John Levon * FormBase.C: no longer transient dialogs, XMapWindow() diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index e03fed5753..ef41f316ca 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -1184,7 +1184,9 @@ bool FormPreferences::Converters::Input() string const FormPreferences::Converters::GetFrom() const { - int const i = fl_get_choice(dialog_->choice_from); + Formats::FormatList::size_type const i = + fl_get_choice(dialog_->choice_from); + if (i > 0 && i <= local_formats.size()) return local_formats.Get(i-1).name(); else { @@ -1197,7 +1199,9 @@ string const FormPreferences::Converters::GetFrom() const string const FormPreferences::Converters::GetTo() const { - int const i = fl_get_choice(dialog_->choice_to); + Formats::FormatList::size_type const i = + fl_get_choice(dialog_->choice_from); + if (i > 0 && i <= local_formats.size()) return local_formats.Get(i-1).name(); else {