Skip to content

Drop static from func signature - #9379

Merged
ev-mp merged 16 commits into
realsenseai:developmentfrom
ev-mp:static_API_only
Jul 15, 2021
Merged

Drop static from func signature#9379
ev-mp merged 16 commits into
realsenseai:developmentfrom
ev-mp:static_API_only

Conversation

@ev-mp

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

Copy link
Copy Markdown
Contributor

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

@ev-mp
ev-mp requested a review from maloel July 14, 2021 06:50
Comment thread include/librealsense2/rsutil.h Outdated
Comment thread include/librealsense2/rsutil.h Outdated
Comment thread src/rs.cpp
}
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

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

Comment thread include/librealsense2/rsutil.h
Comment thread src/rs.cpp Outdated
Tomer Ashuach and others added 16 commits July 14, 2021 15:37
added empty line
Change-Id: Ibfba0dbdba960f3fac5fa1622f3bf3a5fe3a9d23
Change-Id: I4bd8839c48ed10ca151d8bcf0e3ff854af776996
Change-Id: I1fa8a78f58fcb6c29ffe789e48897e4ef1df8c1b
…and removed from the other references

Change-Id: I9b61c3bcdcee06187deb997182b195cb2c60598d
Change-Id: I11ff7a135f1d12d6d7f6964cb3126538c1857b3c
Change-Id: I10cf5ba856fac2dd22154de71f0ac6464d0475bd
@ev-mp
ev-mp force-pushed the static_API_only branch from 296b25c to 369eb17 Compare July 14, 2021 12:38
Comment thread src/rs.cpp
pixel[1] = y * intrin->fy + intrin->ppy;
}
NOEXCEPT_RETURN(, intrin)
NOEXCEPT_RETURN(, pixel)

Copy link
Copy Markdown
Contributor

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?

Comment thread src/rs.cpp
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
Copy Markdown
Contributor

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

@maloel maloel left a comment

Copy link
Copy Markdown
Contributor

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

2 participants