This completely ignores error handling, which probably should be added. The code behavior doesn't change, as the existing comparisons and asserts already promoted the signed value to unsigned.