1. bool b = xx === xxx 这种写法
```cpp
// 源代码
bool handled = DebugEvent.dwDebugEventCode == EXCEPTION_DEBUG_EVENT
&& (DebugEvent.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT
|| DebugEvent.u.Exception.ExceptionRecord.ExceptionCode == STATUS_WX86_BREAKPOINT);
// 自己的代码
bool handled;
if( DebugEvent.dwDebugEventCode == EXCEPTION_DEBUG_EVENT
&& (DebugEvent.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT
|| DebugEvent.u.Exception.ExceptionRecord.ExceptionCode == STATUS_WX86_BREAKPOINT)){
handled = true;
}
```
2. if false == func(.....................................)
写 if语句时将func(....) 放在右边,这样可以提高代码观赏度,如果在左边,则需要看很长一串数字才来对比返回值,如下这两种代码:
# 自己写的代码
if func(arg1,arg2,arg3,....,
,...........) == 3:
....
elif func_2(arg1,arg2,arg3,arg4,...,
,............) == 4:
...
# 优秀的代码
if 3 == func(arg1,arg2,arg3,....,
,...........):
....
elif 4 == func_2(arg1,arg2,arg3,arg4,...,
,............):
...