H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
203 stars 80 forks source link

Combine the two string tokenizer variants into a template #1497

Closed dgelessus closed 10 months ago

dgelessus commented 10 months ago

hsStringTokenizer and hsWStringTokenizer were nearly identical, except for the character type. The Max plugin code also expects the two to have compatible APIs.

I would rather convert this to ST::string like all the other old string code, but one part of the Max plugin (UserPropMgr) depends heavily on how this implementation allocates and reuses strings, so it's difficult to move away from manually managed raw strings. I'm sure the Max code could be rewritten to use fewer weird tricks, but that's not something I want to do, because I have no way to test that code.