Skip to content

Commit

Permalink
iox-#1196 Simplify compare methods
Browse files Browse the repository at this point in the history
Signed-off-by: Marika Lehmann <[email protected]>
  • Loading branch information
FerdinandSpitzschnueffler committed Jul 7, 2022
1 parent a84254e commit 0597fbd
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/string.inl
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,7 @@ inline IsStringOrCharArray<T, int64_t> string<Capacity>::compare(const T& other)
{
return -1;
}
if (m_rawstringSize > otherSize)
{
return 1;
}
return 0;
return (m_rawstringSize > otherSize ? 1 : 0);
}
return result;
}
Expand Down Expand Up @@ -335,11 +331,7 @@ inline int64_t string<Capacity>::compare(char other) const noexcept
{
return -1;
}
if (m_rawstringSize > 1U)
{
return 1;
}
return 0;
return (m_rawstringSize > 1U ? 1 : 0);
}
return result;
}
Expand Down

0 comments on commit 0597fbd

Please sign in to comment.