Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make minor adjustments to depth-metrics.h and a few dependencies to i… #11404

Merged
merged 3 commits into from
Feb 7, 2023

Conversation

cobar001
Copy link
Contributor

@cobar001 cobar001 commented Feb 6, 2023

…mprove modularity.

@cobar001 cobar001 mentioned this pull request Feb 6, 2023
@Nir-Az
Copy link
Collaborator

Nir-Az commented Feb 6, 2023

Thanks
please take a look on failed build in GHA.

D:\a\librealsense\librealsense\tools\depth-quality\depth-metrics.h(205,74): error C2065: 'M_PI': undeclared identifier (compiling source file D:\a\librealsense\librealsense\tools\depth-quality\rs-depth-quality.cpp) [C:\lrs_build\tools\depth-quality\rs-depth-quality.vcxproj]

#include "rendering.h"
#include "float3.h"
#include "plane.h"
#define _USE_MATH_DEFINES
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is a header file IMO we should protect multiple definitions by adding:

#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <cmath>

Same as you can see in src/types.h

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense to me. Done.

Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@Nir-Az Nir-Az merged commit d59d17c into IntelRealSense:development Feb 7, 2023
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.

2 participants