AudioConduit.cpp: do not use 'compare' to test equality of strings; use the string equality operator instead

RESOLVED INVALID

Status

()

RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: sylvestre, Unassigned, Mentored)

Tracking

(Blocks: 1 bug, {good-first-bug})

Trunk
good-first-bug
Points:
---

Firefox Tracking Flags

(firefox54 affected)

Details

(Whiteboard: [lang=C++])

Comment 1

2 years ago
This code appears to function correctly (it is comparing against 0, as required), so this is to some extent a matter of taste. It appears that the Mozilla style guide is silent on this topic.

sylvestre: you should probably start by proposing an adjustment to the C++ style guide. Absent that, this seems like it probably should be closed as INVALID.
Flags: needinfo?(sledru)
(Reporter)

Comment 2

2 years ago
Sure, I will discuss with bsmedberg to update the C++ guide.
FWIW, we have 4 occurrences of this pattern. 3 are in unit tests (media/mtransport/test_nr_socket.cpp l144, 146 and 148), the last is this one.
Flags: needinfo?(sledru)
Keywords: good-first-bug
Whiteboard: [good first bug][lang=C++] → [lang=C++]

Comment 3

2 years ago
I do want to make clear that I don't think that this is actually something the C++ style guide should really opine on, which suggests that this change also shouldn't be made without disussion
(Reporter)

Comment 4

2 years ago
Just like in bug 1334265, this is just a source of good first bug :)
Invalid is fine by me. I have plenty of material others.

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.