initialized VAR

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4474 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2010-05-28 00:08:43 +00:00
parent 9ee70f2cdd
commit bf97275eeb
4 changed files with 9 additions and 5 deletions

View File

@ -62,7 +62,10 @@ CVar CSelectedOutput::Get(int nRow, int nCol)const
VRESULT CSelectedOutput::Get(int nRow, int nCol, VAR* pVAR)const
{
::VarClear(pVAR);
if (::VarClear(pVAR) == VR_BADVARTYPE)
{
return VR_BADVARTYPE;
}
if ((size_t)nRow >= this->GetRowCount() || nRow < 0)
{
pVAR->type = TT_ERROR;

View File

@ -66,6 +66,7 @@ main(int argc, const char* argv[])
return EXIT_FAILURE;
}
VarInit(&v);
for (r = 0; r < GetSelectedOutputRowCount(id); ++r)
{
for (c = 0; c < GetSelectedOutputColumnCount(id); ++c)

View File

@ -99,22 +99,22 @@ main(int argc, const char* argv[])
return EXIT_FAILURE;
}
VAR v;
::VarInit(&v);
for (int r = 0; r < iphreeqc.GetSelectedOutputRowCount(); ++r)
{
for (int c = 0; c < iphreeqc.GetSelectedOutputColumnCount(); ++c)
{
VAR v;
if (iphreeqc.GetSelectedOutputValue(r, c, &v) != VR_OK)
{
return EXIT_FAILURE;
}
if (VarClear(&v) != VR_OK)
if (::VarClear(&v) != VR_OK)
{
return EXIT_FAILURE;
}
}
}
return EXIT_SUCCESS;
}

View File

@ -94,7 +94,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy phreeqc.dat.in phreeqc.dat&#x0D;&#x0A;copy ex1.in ex1&#x0D;&#x0A;"
CommandLine="copy phreeqc.dat.in phreeqc.dat&#x0D;&#x0A;copy ex2.in ex2&#x0D;&#x0A;"
/>
</Configuration>
<Configuration