Skip to content

Commit

Permalink
Avoid infinite recursion in boost == operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kleag committed May 2, 2024
1 parent 93f52f2 commit 3c5877e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lima_common/src/common/LimaCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ enum LimaStatusCode {

BOOST_STRONG_TYPEDEF(char, NoParameters);

#define UNDEFLANG std::numeric_limits<uint8_t>::max()

BOOST_STRONG_TYPEDEF(uint8_t, MediaId);

#define UNDEFLANG static_cast<Lima::MediaId>(std::numeric_limits<uint8_t>::max())
/**
* The main LIMA exception class. Throw this exception to signal a problem with
* a precise associated message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ getConstraintFunction(const std::string& id,
it,it_end;
boost::tie(it,it_end)=m_constraintMap.equal_range(id);
for (;it!=it_end; it++) {
if ((*it).second->getComplementString() == complement &&
(*it).second->getLanguage() == language) {
if ((*it).second->getComplementString() == complement
&& static_cast<MediaId>((*it).second->getLanguage()) == language) {
// LDEBUG << "getConstraintFunction: function exist: "
// << (*it).first << "," << (*it).second->getComplementString()
// << "->" << (*it).second;
Expand Down

0 comments on commit 3c5877e

Please sign in to comment.