使用boost pfr 遍历结构体
This commit is contained in:
@@ -125,7 +125,7 @@ Dll_Global::Dll_Global() {
|
||||
std::cout << "Dll_Global 配置文件加载失败!" << std::endl;
|
||||
Psc::fail_fast();
|
||||
}
|
||||
load(&config.value());
|
||||
from_base_json(&config.value());
|
||||
psm = new std::uint8_t[65536 * 2];
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ void adsb_close() {
|
||||
void Dll_Global::save() {
|
||||
std::ofstream config_file;
|
||||
config_file.open(get_config_path());
|
||||
std::string json = to_json().to_json_string();
|
||||
std::string json = to_base_json().to_json_string();
|
||||
config_file.write(json.c_str(), static_cast<long long>(json.size()));
|
||||
config_file.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user