libcamera: utils: StringSplitter: Add operator==
If `cpp_debugstl` is enabled in the build configuration, then libstdc++ will try to use `==` on operators in certain cases to carry out extra checks. This leads to build failures because `StringSplitter::iterator` has no `operator==`. Implement `operator==`, and express `operator!=` in terms of it. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
f1bc9edb46
commit
737fb452fc
1 changed files with 6 additions and 1 deletions
|
@ -205,9 +205,14 @@ public:
|
||||||
iterator &operator++();
|
iterator &operator++();
|
||||||
std::string operator*() const;
|
std::string operator*() const;
|
||||||
|
|
||||||
|
bool operator==(const iterator &other) const
|
||||||
|
{
|
||||||
|
return pos_ == other.pos_;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator!=(const iterator &other) const
|
bool operator!=(const iterator &other) const
|
||||||
{
|
{
|
||||||
return pos_ != other.pos_;
|
return !(*this == other);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue