-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Igor Pechtchanski wrote: > This patch implements one of the setup augmentations useful for the > "installation profiles idea" (for lack of a better name :-) ). > Igor > ============================================================================== > ChangeLog: > 2005-11-16 Igor Pechtchanski <[EMAIL PROTECTED]> > > * PickView.cc (PickView::setViewMode): Auto-expand category if > its name starts with a dot. > > Index: PickView.cc > =================================================================== > RCS file: /cvs/cygwin-apps/setup/PickView.cc,v > retrieving revision 2.26 > diff -u -p -r2.26 PickView.cc > --- PickView.cc 9 Sep 2005 19:08:01 -0000 2.26 > +++ PickView.cc 16 Nov 2005 19:54:58 -0000 > @@ -160,7 +160,8 @@ PickView::setViewMode (views mode) > for (packagedb::categoriesType::iterator n = > packagedb::categories.begin(); n != packagedb::categories.end(); > ++n) > - insert_category (&*n, CATEGORY_COLLAPSED); > + insert_category (&*n, *(*n).first.c_str() == '.' > + ? CATEGORY_EXPANDED : CATEGORY_COLLAPSED); > } > else > {
I'm fine with the concept, BUT: using *string to mean "the first character of string", whilst valid, doesn't express the intent very clearly to people reading the code. So, please use (*n).first.c_str()[0] instead. With that change, please commit. Thanks, Max. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) iD8DBQFEFua6fFNSmcDyxYARAgsPAKDEYL/1wlROl7fdJe6FukBtPvNpwACfZN6T xIs8GW2Y02h5XHoqyVb1Yq8= =GjBo -----END PGP SIGNATURE-----