mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Make LiquidKind::merge as inlineable, remove always from TerrainGrid::for_each_in inline annotation
This commit is contained in:
parent
2350c08e91
commit
f65399eb00
@ -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) {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user