Closed Tastyep closed 9 years ago
In which cases ? Which loops should be replaced ?
Everytime you are filling up a continuous memory container. I changed it but you were fill up your bf or fg vertices with a range based loop
I see what you're referring to, it's the background tiles that get set to stone by default when underground, okay.
Think about using std::fill instead of a range-based for loop, it has a big impact on performances:
Ran a test with a vector of 100000000 int: loop: real 0m1.273s std::fill: real 0m0.593s
Edit: Also use the .assign method from vector when copying one to the other
real 0m0.382s real 0m0.827s