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 it compile with glibc-2.26 with an explicit cast to bool #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bulwahn
Copy link

@bulwahn bulwahn commented Aug 21, 2017

With glibc-2.26, openslam_gmapping failed to compile with:

| [...]/gridfastslam/gfsreader.cpp: In member function 'virtual void GMapping::GFSReader::RawOdometryRecord::read(std::istream&)':
| [...]/gridfastslam/gfsreader.cpp:79:3: error: no match for 'operator==' (operand types are 'std::istream {aka std::basic_istream<char>}' and 'int')
|    assert(is);
|    ^

Hence, this commit explicitly casts to bool, so that the assert annotation compiles properly again. The issue was discovered during the maintenance of meta-ros, the OpenEmbedded layer for ROS.

With glibc-2.26, openslam_gmapping failed to compile with:
```
| [...]/gridfastslam/gfsreader.cpp: In member function 'virtual void GMapping::GFSReader::RawOdometryRecord::read(std::istream&)':
| [...]/gridfastslam/gfsreader.cpp:79:3: error: no match for 'operator==' (operand types are 'std::istream {aka std::basic_istream<char>}' and 'int')
|    assert(is);
|    ^
```

Hence, this commit explicitly casts to bool, so that the assert annotation compiles
properly again.

Signed-off-by: Lukas Bulwahn <[email protected]>
@k-okada k-okada changed the base branch from master to melodic-devel September 30, 2021 02:15
@k-okada k-okada changed the base branch from melodic-devel to master September 30, 2021 02:15
Copy link
Contributor

@k-okada k-okada left a comment

Choose a reason for hiding this comment

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

@bulwahn could you create new PR against melodic-devel branch? we have switched from master to melodic-branch when we changed licence to BSD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants