mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Switch attribute-based vector data from referencing PointIds to indexes in the points table (#1949)
* Index for points * Code review * Add todo comment about a possible perf optimization --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -10,7 +10,7 @@ impl<PointId: crate::Identifier> Subpath<PointId> {
|
||||
/// A `Subpath` with less than 2 [ManipulatorGroup]s may not be closed.
|
||||
#[track_caller]
|
||||
pub fn new(manipulator_groups: Vec<ManipulatorGroup<PointId>>, closed: bool) -> Self {
|
||||
assert!(!closed || manipulator_groups.len() > 1, "A closed Subpath must contain more than 1 ManipulatorGroup.");
|
||||
assert!(!closed || !manipulator_groups.is_empty(), "A closed Subpath must contain more than 0 ManipulatorGroups.");
|
||||
Self { manipulator_groups, closed }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user