src/util/yp_char.c in yarp-0.10.0 vs src/util/yp_char.c in yarp-0.11.0

- old
+ new

@@ -73,23 +73,18 @@ // Returns the number of characters at the start of the string that are // whitespace while also tracking the location of each newline. Disallows // searching past the given maximum number of characters. size_t -yp_strspn_whitespace_newlines(const uint8_t *string, ptrdiff_t length, yp_newline_list_t *newline_list, bool stop_at_newline) { +yp_strspn_whitespace_newlines(const uint8_t *string, ptrdiff_t length, yp_newline_list_t *newline_list) { if (length <= 0) return 0; size_t size = 0; size_t maximum = (size_t) length; while (size < maximum && (yp_byte_table[string[size]] & YP_CHAR_BIT_WHITESPACE)) { if (string[size] == '\n') { - if (stop_at_newline) { - return size + 1; - } - else { - yp_newline_list_append(newline_list, string + size); - } + yp_newline_list_append(newline_list, string + size); } size++; }