Inefficient comparison between string and char array
Original Reporter info from Mantis: runewalsh
-
Reporter name:
Original Reporter info from Mantis: runewalsh
- Reporter name:
Description:
The code attached generates 18 calls to fpc_CharArray_To_AnsiStr. Could it get along without a single one? :(
To be fair, it ends up with only one allocation (still 18 calls, but seeminly reusing the same allocation) when all of these comparisons are in one scope.
Mantis conversion info:
- Mantis ID: 38756
- Build: r49167 [2021/04/10]
- Version: 3.3.1