Fix issue with auto and eigen return type #236
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a temporary variable to store eigenvectors before extracting their real parts in src/cctag/Fitting.cpp. The reviewer advised against using auto with Eigen expressions due to the risk of dangling references and suggested explicitly typing the variable as Array33f to ensure immediate evaluation and eliminate the need for the temporary variable.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull request overview
This PR addresses a platform-dependent Eigen expression type deduction issue that caused incorrect eigenvector real-part handling, impacting ellipse fitting and ultimately marker detection accuracy (as reported in #219 and #226).
Changes:
- Replace
auto-deduced Eigen expression storage with an explicitArray33fmaterialization ofeigenvectors().real().array()to avoid problematic template/return-type deduction on some compilers/platforms.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request replaces the use of auto with the explicit type Array33f when assigning the real part of eigenvectors in src/cctag/Fitting.cpp. This is a standard practice in Eigen-based code to prevent issues related to lazy evaluation and expression templates. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
A problem with deducing the proper return type for eigen was detected in #219. In #226 also it shows that this affects the markers detection on some platforms.