From 31095d3a9d9ca701e6271b36d37cc25d27a272d1 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 25 Sep 2017 13:14:21 +0200 Subject: [PATCH] Use assign instead of clear and resize --- rtgui/options.cc | 3 +-- rtgui/preferences.cc | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index 45f4896d6..49c213ebd 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -511,8 +511,7 @@ void Options::setDefaults () #endif // 0 = SET mode, 1 = ADD mode - baBehav.clear(); - baBehav.resize(ADDSET_PARAM_NUM, 0); + baBehav.assign(ADDSET_PARAM_NUM, 0); rtSettings.darkFramesPath = ""; rtSettings.flatFieldsPath = ""; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index b228c4dc7..d6907a933 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -2563,8 +2563,7 @@ bool Preferences::splashClosed (GdkEventAny* event) void Preferences::behAddSetAllPressed (bool add) { - moptions.baBehav.clear(); - moptions.baBehav.resize(ADDSET_PARAM_NUM, add); + moptions.baBehav.assign(ADDSET_PARAM_NUM, add); for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); ++sections) { for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); ++adjs) { adjs->set_value(behavColumns.badd, add);