Skip to content

Commit

Permalink
Compare pointers if we dont compare indices
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
  • Loading branch information
RRozak committed Jan 22, 2025
1 parent aed49b2 commit d15b23e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VlcSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class VlcSourceCount final {
const std::string aWithoutIndex = aStripped.substr(0, aStripped.size() - aIndexLength);
const std::string bWithoutIndex = bStripped.substr(0, bStripped.size() - bIndexLength);
if (aWithoutIndex != bWithoutIndex) {
// different variables, compare names
return aWithoutIndex < bWithoutIndex;
// different variables, compare pointers
return a < b;
}
if (aIndexLength == 0 || bIndexLength == 0) {
// probably a case like:
Expand Down

0 comments on commit d15b23e

Please sign in to comment.