When tty is empty (CFRegion_C2H and CFRegion_H2C in Storage.C), conversion tty.size()-1 -> int becomes 2^64-1 -> int, narrowing and implicit conversion
int findHiddenMember(int i, const std::string& lbl, const Variant::Members& ms)
Although this code works on all modern platform (2 complement, guaranteed by c++17), it did take extra mental effort for me to be sure it won't cause real(?) problem
In
When
tty
is empty (CFRegion_C2H
andCFRegion_H2C
inStorage.C
), conversiontty.size()-1
->int
becomes 2^64-1 ->int
, narrowing and implicit conversionAlthough this code works on all modern platform (2 complement, guaranteed by c++17), it did take extra mental effort for me to be sure it won't cause real(?) problem