fixed dead code

This commit is contained in:
ALEXks
2024-04-14 21:30:09 +03:00
parent f7406cf729
commit d8bd2ec43a
5 changed files with 116 additions and 17 deletions

View File

@@ -139,6 +139,36 @@ void CStat::init(const char* path) {
strcpy(spath, path);
}
void CStat::init(CStatRead* stat_) {
isjson = false;
if (isinitialized) {
err = true;
return;
}
stat = stat_;
int warn;
if (stat->Valid(&warn) != TRUE) {
err = true;
return;
}
nproc = stat->QProc();
if (nproc == 0) {
err = true;
return;
}
stat->VMSSize(p_heading);
unsigned long n = stat->BeginTreeWalk();
if (n != 0) inter_tree = new CStatInter(stat, n);
proc_info = new struct CProcInfo[nproc];
for (unsigned long i = 0; i < nproc; i++)
stat->NameTimeProc(i, &proc_info[i].node_name, &proc_info[i].test_time);
isinitialized = true;
//TODO: ?
/*spath = new char[strlen(path) + 1];
strcpy(spath, path);*/
}
CStatInter * find_inter(short type, long expr, short nlev, CStatInter * cur) {
while (cur != NULL) {
if (cur->id.t == type && cur->id.nlev == nlev)