lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master 2afd2fe 3/6: Improve concinnity


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master 2afd2fe 3/6: Improve concinnity
Date: Fri, 3 Mar 2017 15:29:05 +0100

On Tue, 28 Feb 2017 22:02:58 -0500 (EST) Greg Chicares <address@hidden> wrote:

GC> branch: master
GC> commit 2afd2fe24692899ca0f06094707896bbdc3e3e80
GC> Author: Gregory W. Chicares <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC> 
GC>     Improve concinnity
GC>     
GC>     Write 'break' outside 'case' braces, as is done elsewhere in lmi.
GC> ---
GC>  input_sequence_entry.cpp | 12 ++++++------
GC>  1 file changed, 6 insertions(+), 6 deletions(-)
GC> 
GC> diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
GC> index c462b75..4cfabc9 100644
GC> --- a/input_sequence_entry.cpp
GC> +++ b/input_sequence_entry.cpp
GC> @@ -497,33 +497,32 @@ std::string InputSequenceEditor::sequence_string()
GC>              case e_retirement:
GC>                  {
GC>                  s.append(" retirement");
GC> -                break;
GC>                  }
GC> +                break;
GC>              case e_attained_age:
GC>                  {
GC>                  s.append(" @");
GC>                  
s.append(value_cast<std::string>(duration_num_field(i).GetValue()));
GC> -                break;
GC>                  }
GC> +                break;
GC>              case e_duration:
GC>                  {
GC>                  s.append(" ");
GC>                  
s.append(value_cast<std::string>(duration_num_field(i).GetValue()));
GC> -                break;
GC>                  }
GC> +                break;
GC>              case e_number_of_years:
GC>                  {
GC>                  s.append(" #");
GC>                  
s.append(value_cast<std::string>(duration_num_field(i).GetValue()));
GC> -                break;
GC>                  }
GC> +                break;
GC>              case e_maturity:
GC>                  {
GC>                  LMI_ASSERT(i == rows_count_ - 1);
GC>                  // " maturity" is implicit, don't add it
GC> -                break;
GC>                  }
GC> -
GC> +                break;

 Just to be sure, is always using braces around the "case" statements, even
when they're not necessary, also a convention in lmi? I am going to update
my mental lmi style guide with this one as I didn't really notice this
before (and maybe some day I'll translate this guide from the mental to
written form, with your help...).

 Thanks,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]