Typos found by checking clang warnings. (issue 365800043 by lemzwerg@googlemail.com)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Typos found by checking clang warnings. (issue 365800043 by lemzwerg@googlemail.com)

David Kastrup
All three look indeed like typos, but all three look like they will have
significant effects warranting individual testing and likely a regtest.
So while that looks bothersome, it might make sense turning this into
three separate issues.

https://codereview.appspot.com/365800043/

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Typos found by checking clang warnings. (issue 365800043 by lemzwerg@googlemail.com)

lemzwerg
Reviewers: dak,

Message:
On 2018/11/04 23:11:20, dak wrote:
> All three look indeed like typos, but all three look like they will
have
> significant effects warranting individual testing and likely a
regtest.  So
> while that looks bothersome, it might make sense turning this into
three
> separate issues.

Basically I agree.  However, I would like to see first what kind of
changes the fixes cause so that sensible descriptions are possible for
another round of refinements.  As mentioned earlier, I have no idea what
will happen.

Description:
Typos found by checking clang warnings.

Please review this at https://codereview.appspot.com/365800043/

Affected files (+4, -4 lines):
   M lily/accidental-engraver.cc
   M lily/page-spacing.cc
   M lily/vaticana-ligature-engraver.cc


Index: lily/accidental-engraver.cc
diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc
index  
003b37ff318f56f11638bb099ffbfffe76efb7fc..af508be387a8adad8fba8e65bedc25bd8d1897b5  
100644
--- a/lily/accidental-engraver.cc
+++ b/lily/accidental-engraver.cc
@@ -163,8 +163,8 @@ struct Accidental_result

    int score () const
    {
-    return need_acc ? 1 : 0
-           + need_restore ? 1 : 0;
+    return (need_acc ? 1 : 0)
+           + (need_restore ? 1 : 0);
    }
  };

Index: lily/page-spacing.cc
diff --git a/lily/page-spacing.cc b/lily/page-spacing.cc
index  
3e7bc1f657c5e3206d35b19b485f9f4dcc7fe548..75bcb26c75a88b31a5236dcf4b026dd6dae87498  
100644
--- a/lily/page-spacing.cc
+++ b/lily/page-spacing.cc
@@ -360,7 +360,7 @@ Page_spacer::calc_subproblem (vsize page, vsize line)
            Real penalty = breaker_->line_count_penalty (line_count);
            if (page_start > 0)
              penalty += lines_[page_start - 1].page_penalty_
-                       + (page % 2 == 0) ? lines_[page_start -  
1].turn_penalty_ : 0;
+                       + ((page % 2 == 0) ? lines_[page_start -  
1].turn_penalty_ : 0);

            /* Deal with widow/orphan lines */
            /* Last line of paragraph is first line on the new page */
Index: lily/vaticana-ligature-engraver.cc
diff --git a/lily/vaticana-ligature-engraver.cc  
b/lily/vaticana-ligature-engraver.cc
index  
1785d4478b407b142b839c82f766e277d6f555ea..1e1cd007b7987c3e2b2ac5b35de8d24fd0483de0  
100644
--- a/lily/vaticana-ligature-engraver.cc
+++ b/lily/vaticana-ligature-engraver.cc
@@ -655,7 +655,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner  
*ligature,
                                          scm_from_int (prev_delta_pitch));
            prev_primitive->set_property ("flexa-width",
                                          scm_from_double (flexa_width));
-          bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
+          bool add_cauda = !(prev_prefix_set & PES_OR_FLEXA);
            prev_primitive->set_property ("add-cauda",
                                          ly_bool2scm (add_cauda));
            check_for_prefix_loss (primitive);



_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel