Skip to content

Commit

Permalink
fix(google-cpp-styleguide/headers.rst): modify the meaning expression
Browse files Browse the repository at this point in the history
表达官方原意,否则将 '#define' 改为 '#ifndef'
  • Loading branch information
geometryolife committed Sep 19, 2021
1 parent fb15b3a commit ff4686d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google-cpp-styleguide/headers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

.. tip::

所有头文件都应该使用 ``#define`` 来防止头文件被多重包含, 命名格式当是: ``<PROJECT>_<PATH>_<FILE>_H_`` .
所有头文件都应该有 ``#define`` 保护来防止头文件被多重包含, 命名格式当是: ``<PROJECT>_<PATH>_<FILE>_H_`` .

为保证唯一性, 头文件的命名应该基于所在项目源代码树的全路径. 例如, 项目 ``foo`` 中的头文件 ``foo/src/bar/baz.h`` 可按如下方式保护:

Expand Down

0 comments on commit ff4686d

Please sign in to comment.