Skip to content

Commit 7b12216

Browse files
committed
comment out toArray in example file
1 parent 006c182 commit 7b12216

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

examples/List/UtilsAndHelper/UtilsAndHelper.ino

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ void setup() {
3535
Serial.println("Inserted another element");
3636

3737
// Convert list to array
38-
int *array = list.toArray();
39-
// Print every element from the new array
40-
Serial.print("The list contains the following values which are get by converting the list to an array: [");
41-
for (int i = 0; i < list.getSize(); ++i) {
42-
Serial.print(array[i]);
43-
if (i != list.getSize() - 1) { // only add the ',' if the element is not the last; otherwise the output would be: [2,2,]; but now it is [2,2]
44-
Serial.print(",");
45-
}
46-
}
47-
Serial.println("]");
48-
// free memory space generated by toArray(), because it is not used anymore
49-
free(array);
38+
//int *array = list.toArray();
39+
//// Print every element from the new array
40+
//Serial.print("The list contains the following values which are get by converting the list to an array: [");
41+
//for (int i = 0; i < list.getSize(); ++i) {
42+
// Serial.print(array[i]);
43+
// if (i != list.getSize() - 1) { // only add the ',' if the element is not the last; otherwise the output would be: [2,2,]; but now it is [2,2]
44+
// Serial.print(",");
45+
// }
46+
//}
47+
//Serial.println("]");
48+
//// free memory space generated by toArray(), because it is not used anymore
49+
//free(array);
5050

5151
Serial.println();
5252

0 commit comments

Comments
 (0)