Closed Bug 1334797 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: WebRTC: Signaling, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox54 --- affected

People

(Reporter: Sylvestre, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=C++])

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)
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++]
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
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.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.