| 136 | /// Helper for get_sequence_x |
| 137 | template <typename octet_iterator> |
| 138 | utf_error increase_safely(octet_iterator& it, octet_iterator end) |
| 139 | { |
| 140 | if (++it == end) |
| 141 | return NOT_ENOUGH_ROOM; |
| 142 | |
| 143 | if (!utf8::internal::is_trail(*it)) |
| 144 | return INCOMPLETE_SEQUENCE; |
| 145 | |
| 146 | return UTF8_OK; |
| 147 | } |
| 148 | |
| 149 | #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;} |
| 150 |
nothing calls this directly
no test coverage detected