grt: make x/y private in PointT in cugr#8269
Merged
maliberty merged 2 commits intoThe-OpenROAD-Project:masterfrom Sep 10, 2025
Merged
grt: make x/y private in PointT in cugr#8269maliberty merged 2 commits intoThe-OpenROAD-Project:masterfrom
maliberty merged 2 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
301f336 to
75a8d40
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Lesson learned the hard way
auto [min_x, max_x] = std::minmax(node->x(), child->x());
if x() returns an int this does not work! minmax returns a pair of
const int& that then go out of scope leaving min_x/max_x dangling.
Lifetime extension does not apply to the destructed binding. Gemini
and chatgpt both failed to figure this out without me essentially
explaining it to them (repeatedly).
auto [min_x, max_x] = std::minmax({node->x(), child->x()});
does work as the initializer list form returns a pair of ints which
get copied. The joys of c++...
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
2ef7fd0
into
The-OpenROAD-Project:master
10 of 11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.