diff --git a/google-cpp-styleguide/formatting.rst b/google-cpp-styleguide/formatting.rst index e2ee23a..f40c516 100644 --- a/google-cpp-styleguide/formatting.rst +++ b/google-cpp-styleguide/formatting.rst @@ -495,7 +495,7 @@ ``return`` 表达式里时没必要都用圆括号。 -在 ``return expr;`` 里就用圆括号,当且只当您会在 ``x = epr;`` 用上它们(acgtyrant 注:字面上的意思就是这样,我也不知怎么理解,只能直译了;我猜意为「当且只当您用该函数的返回值赋值给某变量」)。 +假如您写 ``x = epr`` 时本来就会加上括号,那 ``return expr;`` 也可如法炮制。 函数返回时不要使用圆括号: