Skip to content

Fix build fail due missing operator= in popup - #10881

Merged
maloel merged 2 commits into
realsenseai:developmentfrom
baderouaich:development
Sep 8, 2022
Merged

Fix build fail due missing operator= in popup#10881
maloel merged 2 commits into
realsenseai:developmentfrom
baderouaich:development

Conversation

@baderouaich

Copy link
Copy Markdown
Contributor

Fix build failure after PR #10809 in Windows and Linux due missing operator= in common/viewer.h#16 which is required by std::vector::erase when having const members.

Workaround

this can also be solved by making the struct popup's members header, message and custom_command non-const instead of using const_cast.

@Nir-Az
Nir-Az requested a review from maloel September 7, 2022 19:08
@Nir-Az

Nir-Az commented Sep 7, 2022

Copy link
Copy Markdown
Collaborator

@baderouaich Thanks for the quick catch!
Will be fixed soon.

If an operator=() is needed then objects can't be const. Using a `const_cast` is not a good idea, IMO.
@maloel
maloel merged commit 0501678 into realsenseai:development Sep 8, 2022
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.

3 participants