Skip to content

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 <lukas.bulwahn@gmail.com>
@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