[haiku-bugs] Re: [Haiku] #5525: Implement archiving in layouting classes

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 17 Jul 2010 00:44:04 -0000

#5525: Implement archiving in layouting classes
-------------------------------------+--------------------------------------
  Reporter:  mmadia                  |         Owner:  bonefish      
      Type:  enhancement             |        Status:  in-progress   
  Priority:  normal                  |     Milestone:                
 Component:  Kits/Interface Kit      |       Version:  R1/Development
Resolution:                          |      Keywords:                
Blocked By:  6256, 6257, 6302, 6314  |   Has a Patch:  1             
  Platform:  All                     |      Blocking:  5524          
-------------------------------------+--------------------------------------

Comment (by bonefish):

 Forgot to mention that for BGridLayout the message field grouping could be
 used to save space as well. In case that applies to more classes, I'm sure
 you'll find them all. :-)

 Applied the BGroupLayout patch in r37545 with some blank line adjustments
 plus changes addressing the following:

 {{{
 +#include <new>
 +using std::nothrow;
 }}}

 Please rather use `std::nothrow` in the code (same for `std::string`,
 `std::map`, etc.). I believe only old code exclusively written for gcc 2
 and adjusted for gcc 4 with minimal effort uses the the `using`
 directives. Where it gets longish (e.g. `std::map<std::string,
 std::string>`) a typedef helps.

 {{{
 +BGroupLayout::BGroupLayout(BMessage* from)
 +       :
 +       BTwoDimensionalLayout(from)
 +{
 +       bool isVertical;
 +       if (from->FindBool(kVerticalField, &isVertical) != B_OK)
 +               isVertical = false;
 +       fOrientation = (isVertical) ? B_VERTICAL : B_HORIZONTAL;
 }}}

 Superfluous parentheses.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5525#comment:16>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: