Commit 9c096894 authored by Vitaly Lipatov's avatar Vitaly Lipatov

iocalibr: cleanup code

parent 72b69799
...@@ -12,9 +12,11 @@ ...@@ -12,9 +12,11 @@
#include <comedilib.h> #include <comedilib.h>
#include <UniXML.h> #include <UniXML.h>
#include <UniSetTypes.h>
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
using namespace std; using namespace std;
using namespace UniSetTypes;
struct equals struct equals
{ {
...@@ -374,9 +376,9 @@ void openXML() ...@@ -374,9 +376,9 @@ void openXML()
string str; string str;
str.clear(); str.clear();
getline(cin,str); getline(cin,str);
if( str != "") if( str != "")
openFileXml=str; openFileXml=str;
try try
{ {
...@@ -410,17 +412,17 @@ void openXML() ...@@ -410,17 +412,17 @@ void openXML()
int ndat, ncal; int ndat, ncal;
for(;it;it.goNext()) for(;it;it.goNext())
{ {
ndat = atoi(it.getProp("x").c_str()); ndat = it.getIntProp("x");
ncal = atoi(it.getProp("y").c_str()); ncal = it.getIntProp("y");
massDat[ndat]=ncal; massDat[ndat] = ncal;
} }
uxml.close(); uxml.close();
return; return;
} }
catch( ... ) catch( ... )
{ {
cout<<"File "<<openFileXml<<"can not be opened"<<endl; cout << "File " << openFileXml << "can not be opened" << endl;
} }
} }
} }
...@@ -475,8 +477,8 @@ void sortData(bool rise,bool cal) ...@@ -475,8 +477,8 @@ void sortData(bool rise,bool cal)
eq.cal=*itl; eq.cal=*itl;
sortedMass.push_back(eq); sortedMass.push_back(eq);
} }
tt=*itl; tt=*itl;
} }
} }
else if(!rise && cal) else if(!rise && cal)
...@@ -507,8 +509,8 @@ void sortData(bool rise,bool cal) ...@@ -507,8 +509,8 @@ void sortData(bool rise,bool cal)
eq.cal=*itl; eq.cal=*itl;
sortedMass.push_back(eq); sortedMass.push_back(eq);
} }
tt=*itl; tt=*itl;
} }
} }
else if(rise && !cal) else if(rise && !cal)
{ {
...@@ -519,7 +521,7 @@ void sortData(bool rise,bool cal) ...@@ -519,7 +521,7 @@ void sortData(bool rise,bool cal)
eq.dat=it->first; eq.dat=it->first;
eq.cal=it->second; eq.cal=it->second;
sortedMass.push_back(eq); sortedMass.push_back(eq);
} }
} }
else if(!rise && !cal) else if(!rise && !cal)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment