Skip to content

Conversation

@nixonyh
Copy link
Member

@nixonyh nixonyh commented Jan 9, 2026

Fixes #10

@nixonyh nixonyh requested a review from Sheerwin02 January 9, 2026 10:23
Comment on lines +185 to +213
/// Set [`Self::POSITIONED`] flag to `false`.
pub fn needs_reposition(&mut self) {
self.remove(Self::POSITIONED);
}

/// Set [`Self::CONSTRAINED`] flag to `false`.
pub fn needs_reconstrain(&mut self) {
self.remove(Self::CONSTRAINED);
}

/// Set [`Self::BUILT`] flag to `false`.
pub fn needs_rebuild(&mut self) {
self.remove(Self::BUILT);
}

/// Set [`Self::POSITIONED`] flag to `true`.
pub fn has_repositioned(&mut self) {
self.insert(Self::POSITIONED);
}

/// Set [`Self::CONSTRAINED`] flag to `true`.
pub fn has_recontrained(&mut self) {
self.insert(Self::CONSTRAINED);
}

/// Set [`Self::BUILT`] flag to `true`.
pub fn has_rebuilt(&mut self) {
self.insert(Self::BUILT);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably come up with better naming.

@nixonyh nixonyh merged commit cfdd307 into main Jan 10, 2026
7 checks passed
@nixonyh nixonyh deleted the use-bitflags branch January 10, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compact bool flags into a bitflag

2 participants