Lehks / NostraUtils

A Utility Library for the Nostra Game Engine.
MIT License
6 stars 0 forks source link

String::replace() creates new string instance each iteration. #70

Closed Lehks closed 6 years ago

Lehks commented 6 years ago

File: dat_alg/String.hpp Line: 1434 (and following lines)

The method String::replace() uses substring() to create a string that the target is compared with (line 1444). This is inefficient, because substring() creates a new instance of String each time. It would be more efficient to use logicalSubstring().

NooCi commented 6 years ago

42397a69463833e71cdf549e194117a5486501c7