Merge: lib/core: remove uses of Byte for Text
authorJean Privat <jean@pryen.org>
Fri, 8 Jun 2018 22:42:33 +0000 (18:42 -0400)
committerJean Privat <jean@pryen.org>
Fri, 8 Jun 2018 22:42:33 +0000 (18:42 -0400)
Byte is convenient for automatic modular arithmetic on 8-bit values.

However, due to the way our Numeric types are handled, no automatic
conversion is done when working on primitive types, and operations like
comparison will fail when comparing two values of different type.

This is a cause of bugs as the u8 suffix is requires for comparing two
bytes, and is also the cause for tedious cast operations to go
back-and-forth between Byte and Int.

We remove the uses of Byte in the Text API, and replace then with Int.
This should not have a negative impact on performance.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>

Pull-Request: #2688

1  2 
lib/core/text/abstract_text.nit

Simple merge