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

Drop static from func signature #9379

Merged
merged 16 commits into from Jul 15, 2021
Merged

Conversation

ev-mp
Copy link
Collaborator

@ev-mp ev-mp commented Jul 13, 2021

Follow up on #9096. Addresses #6055
Tracked on: DSO-17046

@ev-mp ev-mp requested a review from maloel July 14, 2021 06:50
@@ -3430,3 +3431,213 @@ rs2_raw_data_buffer* rs2_terminal_parse_response(rs2_terminal_parser* terminal_p
}
HANDLE_EXCEPTIONS_AND_RETURN(nullptr, terminal_parser, command, response)

void rs2_project_point_to_pixel(float pixel[2], const struct rs2_intrinsics* intrin, const float point[3]) BEGIN_API_CALL
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why here? I suggest you move them to a new rsutil.cpp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The implementation for all public APIs is in a single file

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we see fit to separate in a header, we can separate in a different .cpp

src/rs.cpp Outdated Show resolved Hide resolved
@@ -3493,7 +3493,7 @@ void rs2_project_point_to_pixel(float pixel[2], const struct rs2_intrinsics* int
pixel[0] = x * intrin->fx + intrin->ppx;
pixel[1] = y * intrin->fy + intrin->ppy;
}
NOEXCEPT_RETURN(, intrin)
NOEXCEPT_RETURN(, pixel)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this mean only pixel will get output on error?

NOEXCEPT_RETURN(, to_fov)

/* Helper inner function (not part of the API) */
void next_pixel_in_line(float curr[2], const float start[2], const float end[2])
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should probably be static or in an unnamed namespace

Copy link
Collaborator

@maloel maloel left a comment

Choose a reason for hiding this comment

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

I still think we shouldn't have a monolithic rs.cpp, but up to you

@ev-mp ev-mp merged commit e0972d9 into IntelRealSense:development Jul 15, 2021
@ev-mp ev-mp deleted the static_API_only branch August 4, 2021 10:17
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.

None yet

2 participants