@@ -23,10 +23,10 @@ int main() {
2323## 目录
2424
2525- 一、` 标识符 ` 命名风格
26- - 1.0 [ 类型名 - 大驼峰] ( )
27- - 1.1 [ 对象/数据成员 - 小驼峰] ( )
28- - 1.2 [ 函数 - 下划线(snake_case)] ( )
29- - 1.3 [ 私有表示 - ` _ ` 后缀] ( )
26+ - 1.0 [ 类型名 - 大驼峰] ( ./README.md#10-类型名---大驼峰 )
27+ - 1.1 [ 对象/数据成员 - 小驼峰] ( ./README.md#11-对象数据成员---小驼峰 )
28+ - 1.2 [ 函数 - 下划线(snake_case)] ( ./README.md#12-函数---下划线snake_case )
29+ - 1.3 [ 私有表示 - ` _ ` 后缀] ( ./README.md#13-私有表示---_后缀 )
3030- 二、模块化
3131 - 2.0 [ 使用` import xxx ` 替代` #include <xxx> ` ] ( ./README.md#0使用import-xxx替代include-xxx )
3232 - 2.1 [ 模块文件结构] ( ./README.md#1模块文件结构 )
@@ -64,15 +64,16 @@ public: // 4. 构造函数 / bigfive 单独放一个public区域
6464
6565public: // 5.公有函数区域
6666
67- // 函数名 下划线分割 / snake_style
68- void load_config_file(std::string fileName /* 7.小驼峰 */) {
67+ // 函数名 下划线分割 / snake_case
68+ /* 7. fileName 小驼峰 */
69+ void load_config_file(std::string fileName) {
6970 // 成员函数如无特殊要求接口和实现不分离
7071 parse_(config);
7172 }
7273
7374private:
7475
75- // 6.公有函数区域, 被私有成员函数以 `_` 结尾
76+ // 6.被私有成员函数以 `_` 结尾
7677 void parse_(std::string config) {
7778
7879 }
@@ -98,12 +99,14 @@ struct StyleRef {
9899
99100> 一个单词首字母小写, 后续单词首字母大写, 不加下划线
100101
101- - 例: ` fileName, maxRetryCount, configText `
102+ - 例: ` fileName, configText `
102103
103104``` cpp
104105struct StyleRef {
105106 std::string fileName;
106- };
107+ };
108+
109+ StyleRef mcppStyle;
107110```
108111
109112### 1.2 函数 - 下划线(snake_case)
0 commit comments