I noticed this suggest edit:
This suggested edit does two things:
Replace
using namespace std;
, which is considered bad practice in C++, withstd::
.Fix a divide-by-zero bug by special-casing zero.
This edit was rejected by πάντα ῥεῖ, and then approved by Mathieu Guindon ♦.
I disagree with this edit. We do not generally allow editing someone else's code in a question because editing the post is not constructive and it is much more helpful to leave a comment or answer that points out the shortcomings. Code Review is a question and answer site for seeking peer review of your code. An edit with the summary "updated code" is not a review in my opinion. Therefore, this edit kinda defeats the purpose of code reviewing. Therefore, I rolled back the edit as soon as I saw it.
However, I am not 100% sure my action was appropriate. This edit was approved by a moderator, so there has to be a reason. Was my rollback correct? If not, why not?