What about:uint x; auto z = x - 1; ?
When mixing signed and unsigned, as signed, it maybe no mistaken.thhere is a small test,add 'cast(long)' before - operator,if it's auto add,maybe fine.
-----
import std.stdio;
void main()
{
size_t width = 10;
size_t height = 20;
writeln("before width is ",width," ,height is ",height);
height -= 15;
width -= cast(long)height;
writeln("after width is ",width," ,height is ",height);
}
----result: after width is 5 .
it's ok.
Frank
