LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2005--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2005--2019 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 if (!arr) | 51 if (!arr) |
52 { | 52 { |
53 scm_arr = Grob_array::make_array (); | 53 scm_arr = Grob_array::make_array (); |
54 arr = unsmob<Grob_array> (scm_arr); | 54 arr = unsmob<Grob_array> (scm_arr); |
55 me->set_object (sym, scm_arr); | 55 me->set_object (sym, scm_arr); |
56 } | 56 } |
57 return arr; | 57 return arr; |
58 } | 58 } |
59 | 59 |
60 Grob * | 60 Grob * |
61 Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred) (const Grob
*)) | 61 Pointer_group_interface::find_grob (Grob *me, SCM sym, bool (*pred) (Grob const
*)) |
62 { | 62 { |
63 Grob_array *arr = get_grob_array (me, sym); | 63 Grob_array *arr = get_grob_array (me, sym); |
64 | 64 |
65 for (vsize i = 0; i < arr->size (); i++) | 65 for (vsize i = 0; i < arr->size (); i++) |
66 if (pred (arr->grob (i))) | 66 if (pred (arr->grob (i))) |
67 return arr->grob (i); | 67 return arr->grob (i); |
68 | 68 |
69 return 0; | 69 return 0; |
70 } | 70 } |
71 | 71 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 vector<Item *> | 104 vector<Item *> |
105 internal_extract_item_array (Grob const *elt, SCM symbol) | 105 internal_extract_item_array (Grob const *elt, SCM symbol) |
106 { | 106 { |
107 Grob_array *arr = unsmob<Grob_array> (elt->internal_get_object (symbol)); | 107 Grob_array *arr = unsmob<Grob_array> (elt->internal_get_object (symbol)); |
108 vector<Item *> items; | 108 vector<Item *> items; |
109 for (vsize i = 0; arr && i < arr->size (); i++) | 109 for (vsize i = 0; arr && i < arr->size (); i++) |
110 items.push_back (dynamic_cast<Item *> (arr->grob (i))); | 110 items.push_back (dynamic_cast<Item *> (arr->grob (i))); |
111 | 111 |
112 return items; | 112 return items; |
113 } | 113 } |
LEFT | RIGHT |