Remove a level of indirection from internal std.xml.ElementParser code#5380
Remove a level of indirection from internal std.xml.ElementParser code#5380dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
A pointer to a string might be necessary if the caller expects the callee to modify the string (as in, replace it with a different slice of the original data). |
|
In modern D we'd pass the string by ref, but this code may predate that, I'm not sure. |
|
But if the autotester passes, that probably means it was completely unnecessary and we can just merge this. :-D |
|
As best as I can tell, it looks like an attempt to avoid copying. Which is ridiculous as the string struct is tiny in reality and you end up having a pointer to a pointer for the actual data of the string, which is very bad for caches. |
|
I say we just merge this and see what explodes. We can clean up later. This code is badly in need of a major cleanup, new |
|
This introduced a regression. See #5489. |
Removes an odd choice to keep the base string of a tag as a pointer to a string rather than the string itself.
I don't see an obvious reason why this was done, so I removed it for code simplicity and possible speed improvements.