OLD | NEW |
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 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 #include "pointer-group-interface.hh" | 20 #include "pointer-group-interface.hh" |
21 | 21 |
22 #include "grob-array.hh" | 22 #include "grob-array.hh" |
23 #include "grob.hh" | 23 #include "grob.hh" |
24 #include "item.hh" | 24 #include "item.hh" |
25 | 25 |
26 int | 26 int |
27 Pointer_group_interface::count (Grob *me, SCM sym) | 27 Pointer_group_interface::count (Grob *me, SCM sym) |
28 { | 28 { |
29 Grob_array *arr = unsmob<Grob_array> (me->internal_get_object (sym)); | 29 Grob_array *arr = unsmob<Grob_array> (me->internal_get_object (sym)); |
30 return arr ? arr->size () : 0; | 30 return arr ? int (arr->size ()) : 0; |
31 } | 31 } |
32 | 32 |
33 void | 33 void |
34 Pointer_group_interface::add_grob (Grob *me, SCM sym, SCM p) | 34 Pointer_group_interface::add_grob (Grob *me, SCM sym, SCM p) |
35 { | 35 { |
36 add_grob (me, sym, unsmob<Grob> (p)); | 36 add_grob (me, sym, unsmob<Grob> (p)); |
37 } | 37 } |
38 | 38 |
39 void | 39 void |
40 Pointer_group_interface::set_ordered (Grob *me, SCM sym, bool ordered) | 40 Pointer_group_interface::set_ordered (Grob *me, SCM sym, bool ordered) |
(...skipping 63 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 } |
OLD | NEW |