mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Rearrange iteration pattern so that x is in the inner loop in the default for_each_in (no or little perf change)
This commit is contained in:
parent
11c8cf19d1
commit
57922d9802
@ -119,9 +119,9 @@ pub trait ReadVol: BaseVol {
|
||||
where
|
||||
Self::Vox: Copy,
|
||||
{
|
||||
for x in aabb.min.x..aabb.max.x + 1 {
|
||||
for z in aabb.min.z..aabb.max.z + 1 {
|
||||
for y in aabb.min.y..aabb.max.y + 1 {
|
||||
for z in aabb.min.z..aabb.max.z + 1 {
|
||||
for x in aabb.min.x..aabb.max.x + 1 {
|
||||
if let Ok(block) = self.get(Vec3::new(x, y, z)) {
|
||||
f(Vec3::new(x, y, z), *block);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user