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

Move the C++ classes and definitions of inline functions from the Mapper.cpp file to Mapper.h file #22

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

nkuwenjian
Copy link
Contributor

@nkuwenjian nkuwenjian commented Jul 20, 2020

Hi, code maintainer of open_karto repo

Generally speaking, the definition of inline functions is best placed in the .h file. If the definition of the inline function is written in the .cpp file, then this function can only be used in this .cpp file.

I tried to call some inline functions in my project, such as the function GetLastScan, but it failed to compile. That’s why I noticed this problem.

Therefore, I carefully checked all the files in this repo. And I moved all the definitions of inline functions from the Mapper.cpp file to the Mapper.h file.

Furthermore, I also move the implementations of three classes (BreadthFirstTraversal, NearScanVisitor and ScanManager) from the Mapper.cpp file to the Mapper.h file.

Best

Jian Wen
wenjian@mail.nankai.edu.cn

@mikeferguson mikeferguson merged commit 3a2ce75 into ros-perception:melodic-devel Aug 7, 2020
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