Skip to content

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

Merged
Nir-Az merged 3 commits into
realsenseai:developmentfrom
cobar001:depth-metrics-mods-2
Feb 7, 2023
Merged

Make minor adjustments to depth-metrics.h and a few dependencies to i…#11404
Nir-Az merged 3 commits into
realsenseai:developmentfrom
cobar001:depth-metrics-mods-2

Conversation

@cobar001

@cobar001 cobar001 commented Feb 6, 2023

Copy link
Copy Markdown
Contributor

…mprove modularity.

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

Nir-Az commented Feb 6, 2023

Copy link
Copy Markdown
Collaborator

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]

Comment thread tools/depth-quality/depth-metrics.h Outdated
#include "rendering.h"
#include "float3.h"
#include "plane.h"
#define _USE_MATH_DEFINES

Copy link
Copy Markdown
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
Copy Markdown
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.

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

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 realsenseai: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