The UFZ services GitLab and Mattermost will be unavailable on Monday, July 4 from 06:00 AM to 08:00 AM due to maintenance work.

Commit 38019f3f authored by Adam Reichold's avatar Adam Reichold
Browse files

Properly initialize the NextId generator will the last ID used during model initialization.

parent 55dc2289
Pipeline #83917 passed with stage
in 5 minutes and 38 seconds
......@@ -419,7 +419,7 @@ Finally, an associative set of lists of messages used to relocate mobile entitie
colonies: colonies.into(),
observers,
rng,
next_id: NextId::new(rank, size),
next_id: NextId::new(id, rank, size),
observations: Default::default(),
contacts: Default::default(),
vectors: Default::default(),
......
......@@ -200,9 +200,9 @@ pub struct NextId {
}
impl NextId {
pub fn new(rank: u8, size: u8) -> Self {
pub fn new(id: u32, rank: u8, size: u8) -> Self {
Self {
id: u32::from(rank),
id: id + u32::from(rank),
step: u32::from(size),
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment