reuse path & length bufs for curves

This commit is contained in:
MaxOhn
2022-10-22 18:48:52 +02:00
parent 3a1b868a4d
commit ea23a8948b
3 changed files with 40 additions and 26 deletions
@@ -37,7 +37,7 @@ impl<'h> DistanceObjectPatternGenerator<'h> {
prev_pattern: &'h Pattern,
orig: &'h Beatmap,
repeats: usize,
curve: &Curve,
curve: &Curve<'_>,
edge_sounds: &'h [u8],
) -> Self {
let timing_point = orig.timing_point_at(hit_object.start_time);
+2 -2
View File
@@ -136,7 +136,7 @@ impl Beatmap {
}
struct SliderParams<'c> {
curve: &'c Curve,
curve: &'c Curve<'c>,
duration: u32,
repeats: usize,
start_time: f64,
@@ -144,7 +144,7 @@ struct SliderParams<'c> {
}
impl<'c> SliderParams<'c> {
fn new(start_time: f64, repeats: usize, curve: &'c Curve) -> Self {
fn new(start_time: f64, repeats: usize, curve: &'c Curve<'c>) -> Self {
Self {
curve,
repeats,