Martin Friebe wrote:
...
Many of the occurrances look like
SetLength(s, count);
move(str^, s[1], count);
where "s" is a local variable, not used before. So currently it would be
safe to skip uniquestring.
But I consider this as a trap, because future changes may act on "s"
before, without the author being aware of the exact behaviour of move.
After call to SetLength() the string is guaranteed to be unique, hence
there is no trap here.
You may also wish to substitute both calls with a single
SetString(s, str^, count);
which is shorter and does not treat the string in potentially unsafe way.
Best regards,
Sergei
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel