From 2da5c55cf0a968982223682227a0cf3b019d03a8 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Tue, 10 Apr 2012 13:34:10 +0100 Subject: [PATCH] Run fixcc.py with astyle 2.02 --- lily/beam.cc | 1 - lily/include/smobs.hh | 16 +++++++++------- lily/music-function-scheme.cc | 4 ++-- lily/music-function.cc | 5 +++-- lily/undead.cc | 36 ++++++++++++++++++----------------- 5 files changed, 33 insertions(+), 29 deletions(-) diff --git a/lily/beam.cc b/lily/beam.cc index 4e48d43739..0cfc3e193c 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -1280,7 +1280,6 @@ Beam::rest_collision_callback (SCM smob, SCM prev_offset) + (beam_count - 1) * beam_translation; Real beam_y = stem_y - d * height_of_my_beams; - Interval rest_extent = rest->extent (rest, Y_AXIS); rest_extent.translate (offset + rest->get_parent (Y_AXIS)->relative_coordinate (common_y, Y_AXIS)); diff --git a/lily/include/smobs.hh b/lily/include/smobs.hh index 22a4d18309..cd28a29c3f 100644 --- a/lily/include/smobs.hh +++ b/lily/include/smobs.hh @@ -153,10 +153,12 @@ void protect_smob (SCM smob, SCM *prot_cons); void unprotect_smob (SCM smob, SCM *prot_cons); extern bool parsed_objects_should_be_dead; -class parsed_dead { +class parsed_dead +{ static vector elements; SCM data; - SCM readout_one () { + SCM readout_one () + { SCM res = data; data = SCM_UNDEFINED; return res; @@ -171,11 +173,11 @@ public: }; #ifndef NDEBUG -#define ASSERT_LIVE_IS_ALLOWED(arg) \ - do { \ - static parsed_dead pass_here; \ - if (parsed_objects_should_be_dead) \ - pass_here.checkin (arg); \ +#define ASSERT_LIVE_IS_ALLOWED(arg) \ + do { \ + static parsed_dead pass_here; \ + if (parsed_objects_should_be_dead) \ + pass_here.checkin (arg); \ } while (0) #else #define ASSERT_LIVE_IS_ALLOWED(arg) do { } \ diff --git a/lily/music-function-scheme.cc b/lily/music-function-scheme.cc index 39f1bdecbc..e9e9a68ec6 100644 --- a/lily/music-function-scheme.cc +++ b/lily/music-function-scheme.cc @@ -17,8 +17,8 @@ LY_DEFINE (ly_music_function_extract, "ly:music-function-extract", 1, 0, 0, } LY_DEFINE (ly_music_function_signature, "ly:music-function-signature", 1, 0, 0, - (SCM x), - "Return the function signature inside@tie{}@var{x}.") + (SCM x), + "Return the function signature inside@tie{}@var{x}.") { LY_ASSERT_TYPE (is_music_function, x, 1); diff --git a/lily/music-function.cc b/lily/music-function.cc index b9159fe3a7..f206b6b382 100644 --- a/lily/music-function.cc +++ b/lily/music-function.cc @@ -22,13 +22,14 @@ #include "music.hh" #include "ly-smobs.icc" -class Musicfunction { +class Musicfunction +{ DECLARE_SIMPLE_SMOBS (Musicfunction); SCM signature_; SCM function_; public: Musicfunction (SCM signature, SCM function): - signature_(signature), function_(function) { } + signature_ (signature), function_ (function) { } SCM get_function () { return function_; } SCM get_signature () { return signature_; } }; diff --git a/lily/undead.cc b/lily/undead.cc index a3387ea9e9..b29386d2ce 100644 --- a/lily/undead.cc +++ b/lily/undead.cc @@ -20,12 +20,13 @@ #include "smobs.hh" #include "ly-smobs.icc" -class Undead { +class Undead +{ DECLARE_SIMPLE_SMOBS (Undead); SCM object_; public: SCM object () { return object_; } - Undead (SCM object = SCM_UNDEFINED) : object_(object) { }; + Undead (SCM object = SCM_UNDEFINED) : object_ (object) { }; }; SCM @@ -40,8 +41,8 @@ Undead::mark_smob (SCM s) int Undead::print_smob (SCM undead, - SCM port, - scm_print_state *) + SCM port, + scm_print_state *) { scm_puts ("#object (), port); @@ -54,17 +55,17 @@ IMPLEMENT_DEFAULT_EQUAL_P (Undead); IMPLEMENT_TYPE_P (Undead, "ly:undead?") LY_DEFINE (ly_make_undead, "ly:make-undead", - 1, 0, 0, (SCM object), - "This packages @var{object} in a manner that keeps it from" - " triggering \"Parsed object should be dead\" messages.") + 1, 0, 0, (SCM object), + "This packages @var{object} in a manner that keeps it from" + " triggering \"Parsed object should be dead\" messages.") { Undead undead (object); return undead.smobbed_copy (); } LY_DEFINE (ly_get_undead, "ly:get-undead", - 1, 0, 0, (SCM undead), - "Get back object from @var{undead}.") + 1, 0, 0, (SCM undead), + "Get back object from @var{undead}.") { LY_ASSERT_SMOB (Undead, undead, 1); return Undead::unsmob (undead)->object (); @@ -85,18 +86,19 @@ SCM parsed_dead::readout () { SCM result = SCM_EOL; - for (vsize i = 0; i < elements.size (); i++) { - SCM elt = elements[i]->readout_one (); - if (!SCM_UNBNDP (elt)) - result = scm_cons (elt, result); - } + for (vsize i = 0; i < elements.size (); i++) + { + SCM elt = elements[i]->readout_one (); + if (!SCM_UNBNDP (elt)) + result = scm_cons (elt, result); + } return result; } LY_DEFINE (ly_parsed_undead_list_x, "ly:parsed-undead-list!", - 0, 0, 0, (), - "Return the list of objects that have been found live" - " that should have been dead, and clear that list.") + 0, 0, 0, (), + "Return the list of objects that have been found live" + " that should have been dead, and clear that list.") { return parsed_dead::readout (); } -- 2.39.2