This is a very easy good first bug for a beginner. We should use "==" instead of compare here: https://dxr.mozilla.org/mozilla-central/source/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp?q=AudioConduit.cpp&redirect_type=direct#1058 more info: http://clang.llvm.org/extra/clang-tidy/checks/misc-string-compare.html
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.
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.
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
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.