+2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+
+ * QCitationDialog.C (up, down): get rid of the iterator.
+
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* QCitationDialog.C (up, down): fix crash due to invalidated
{
int const sel = selectedLB->currentItem();
+ BOOST_ASSERT(sel > 0);
+
// Move the selected key up one line
- vector<string>::iterator it = form_->citekeys.begin() + sel;
- string const tmp = *it;
+ string const tmp = form_->citekeys[sel];
selectedLB->removeItem(sel);
swap(form_->citekeys[sel - 1], form_->citekeys[sel]);
{
int const sel = selectedLB->currentItem();
+ BOOST_ASSERT(sel < (int)form_->citekeys.size());
+
// Move the selected key down one line
- vector<string>::iterator it = form_->citekeys.begin() + sel;
- string const tmp = *it;
+ string const tmp = form_->citekeys[sel];
selectedLB->removeItem(sel);
swap(form_->citekeys[sel + 1], form_->citekeys[sel]);
+2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+
+ * FormCitation.C (input): get rid of the iterator.
+
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* FormCitation.C (input): fix crash due to invalidated
return ButtonPolicy::SMI_NOOP;
// Move the selected key up one line
- vector<string>::iterator it = citekeys.begin() + sel - 1;
- string const tmp = *it;
+ string const tmp = citekeys[sel - 1];
fl_delete_browser_line(dialog_->browser_cite, sel);
swap(citekeys[sel - 2], citekeys[sel - 1]);
return ButtonPolicy::SMI_NOOP;
// Move the selected key down one line
- vector<string>::iterator it = citekeys.begin() + sel - 1;
- string const tmp = *it;
+ string const tmp = citekeys[sel - 1];
fl_delete_browser_line(dialog_->browser_cite, sel);
swap(citekeys[sel], citekeys[sel - 1]);