浏览代码

Tag new #else and #endif blocks with comments

Vijay Pai 8 年之前
父节点
当前提交
ab00654784
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 2 2
      include/grpc++/impl/codegen/method_handler_impl.h
  2. 5 5
      include/grpc/impl/codegen/port_platform.h

+ 2 - 2
include/grpc++/impl/codegen/method_handler_impl.h

@@ -45,9 +45,9 @@ Status CatchingFunctionHandler(Callable&& handler) {
   } catch (...) {
     return Status(StatusCode::UNKNOWN, "Exception in method handler");
   }
-#else
+#else   // GRPC_ALLOW_EXCEPTIONS
   return handler();
-#endif
+#endif  // GRPC_ALLOW_EXCEPTIONS
 }
 
 /// A wrapper class of an application provided rpc method handler.

+ 5 - 5
include/grpc/impl/codegen/port_platform.h

@@ -483,14 +483,14 @@ typedef unsigned __int64 uint64_t;
  * 0 on non-Windows platforms unless the compiler defines __EXCEPTIONS */
 #ifdef GPR_WINDOWS
 #define GRPC_ALLOW_EXCEPTIONS 1
-#else
+#else /* GPR_WINDOWS */
 #ifdef __EXCEPTIONS
 #define GRPC_ALLOW_EXCEPTIONS 1
-#else
+#else /* __EXCEPTIONS */
 #define GRPC_ALLOW_EXCEPTIONS 0
-#endif
-#endif
-#endif
+#endif /* __EXCEPTIONS */
+#endif /* __GPR_WINDOWS */
+#endif /* GRPC_ALLOW_EXCEPTIONS */
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS