refactor(argparse): 将null替换为nullptr以提高C++兼容性
- 在argparse库中将所有null指针常量替换为nullptr - 更新头文件和源文件中的指针初始化和比较操作 - 修改测试文件中的相关断言检查 - 更新AST定义文件中的注释说明
This commit is contained in:
@@ -538,7 +538,7 @@ void scc_lexer_drop_ring(scc_lexer_tok_ring_t *ring_ref) {
|
||||
}
|
||||
|
||||
void scc_lexer_drop(scc_lexer_t *lexer) {
|
||||
Assert(lexer != null);
|
||||
Assert(lexer != nullptr);
|
||||
if (lexer->ring_ref_count) {
|
||||
LOG_FATAL("drop sstream must be drop ring before ref [%d]",
|
||||
lexer->ring_ref_count);
|
||||
|
||||
@@ -24,12 +24,12 @@ int g_num_arr[3];
|
||||
int main(int argc, char *argv[]) {
|
||||
// int num = 0;
|
||||
if (argc == 3 && strcmp(argv[2], "--debug") == 0) {
|
||||
log_set_level(NULL, LOG_LEVEL_ALL);
|
||||
log_set_level(nullptr, LOG_LEVEL_ALL);
|
||||
} else {
|
||||
// FIXME it is a hack lexer_logger
|
||||
log_set_level(&__scc_lexer_log, LOG_LEVEL_NOTSET);
|
||||
log_set_level(NULL, LOG_LEVEL_INFO | LOG_LEVEL_WARN | LOG_LEVEL_ERROR |
|
||||
LOG_LEVEL_FATAL);
|
||||
log_set_level(nullptr, LOG_LEVEL_INFO | LOG_LEVEL_WARN |
|
||||
LOG_LEVEL_ERROR | LOG_LEVEL_FATAL);
|
||||
}
|
||||
|
||||
const char *file_name = __FILE__;
|
||||
|
||||
Reference in New Issue
Block a user