Make LiquidKind::merge as inlineable, remove always from TerrainGrid::for_each_in inline annotation

This commit is contained in:
Imbris 2021-10-08 11:53:40 -04:00
parent 2350c08e91
commit f65399eb00
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ impl LiquidKind {
/// If an entity is in multiple overlapping liquid blocks, which one takes
/// precedence? (should be a rare edge case, since checkerboard patterns of
/// water and lava shouldn't show up in worldgen)
#[inline]
pub fn merge(self, other: LiquidKind) -> LiquidKind {
use LiquidKind::{Lava, Water};
match (self, other) {

View File

@ -56,7 +56,7 @@ impl<V: RectRasterableVol + ReadVol + Debug> ReadVol for VolGrid2d<V> {
// /// Call provided closure with each block in the supplied Aabb
// /// Areas outside loaded chunks are ignored
#[inline(always)]
#[inline]
fn for_each_in(&self, aabb: Aabb<i32>, mut f: impl FnMut(Vec3<i32>, Self::Vox))
where
Self::Vox: Copy,