修复LoadInfo中成员变量没有初始化的bug

Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
dmy@lab
2015-02-06 15:31:00 +08:00
parent 29828700d2
commit 1f9734d727
4 changed files with 42 additions and 4 deletions

View File

@@ -33,8 +33,8 @@ void LoadExporter::toSingleFile(const QString& filePath)
foreach(QString key, keys)
{
QSharedPointer<LoadInfo> p=this->ht.get(key);
double P=p->getPA()+p->getPB()+p->getPC();
double Q=p->getQA()+p->getQB()+p->getQC();
double P=p->get3PhP();//p->getPA()+p->getPB()+p->getPC();
double Q=p->get3PhQ();//p->getQA()+p->getQB()+p->getQC();
loadSequence[key].push_back(QPair<double,double>(P,Q) );
}
}
@@ -52,7 +52,7 @@ void LoadExporter::toSingleFile(const QString& filePath)
int seq=0;
for(QList<QPair<double,double> >::iterator ite=loadList.begin();ite!=loadList.end();ite++)
{
stream<<"["<<seq++<<"]"<<"("<<ite->first<<"&&"<<ite->second<<")"<<",";
stream<<"["<<seq++<<"],"<<ite->first<<","<<ite->second<<",";
}
stream<<"\t\n";
}