SmartOS/Config.cpp

22 lines
362 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "Config.h"
//TConfig Config;
// 初始化各字段为0
void TConfig::Init()
{
// 实际内存大小,减去头部大小
uint len = sizeof(this) - (int)&Length - (int)this;
memset(&Length, 0, len);
Length = len;
}
void TConfig::LoadDefault()
{
Kind = Sys.Code;
//Server = 0x01;
PingTime = 15;
OfflineTime = 60;
}