refactor(argparse): 将null替换为nullptr以提高C++兼容性
- 在argparse库中将所有null指针常量替换为nullptr - 更新头文件和源文件中的指针初始化和比较操作 - 修改测试文件中的相关断言检查 - 更新AST定义文件中的注释说明
This commit is contained in:
@@ -51,7 +51,7 @@ void reset_token_fill(void) { token_id = 0; }
|
||||
void free_token(test_token_t *tok) {
|
||||
if (tok->data) {
|
||||
scc_free(tok->data);
|
||||
tok->data = NULL;
|
||||
tok->data = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,4 +323,4 @@ TEST_LIST = {{"test_char_ring_basic", test_char_ring_basic},
|
||||
{"test_char_ring_wrap", test_char_ring_wrap},
|
||||
{"test_token_ring_basic", test_token_ring_basic},
|
||||
{"test_token_ring_full", test_token_ring_full},
|
||||
{NULL, NULL}};
|
||||
{nullptr, nullptr}};
|
||||
Reference in New Issue
Block a user