Commit f43abe01 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

FIXED nsert space padding between a header (e.g. 'if', 'for', 'while'...) and the following paren



Result after adding the --pad-header option to astyle
Signed-off-by: Emmanuel Promayon's avatarEmmanuel Promayon <Emmanuel.Promayon@imag.fr>
parent 6eb65498
......@@ -65,7 +65,7 @@ DicomComponent::DicomComponent(DicomSerie* dicomSerie) throw(AbortException) : I
gdcm::IPPSorter ippSorter;
ippSorter.SetComputeZSpacing(true);
ippSorter.SetZSpacingTolerance(0.001);
if(!ippSorter.Sort(stdFileNames)) {
if (!ippSorter.Sort(stdFileNames)) {
CAMITK_ERROR("DicomSerieComponent", "DicomSerieComponent", "IPPSorter sorting failed. Try to adjust Z spacing tolerance.")
files = stdFileNames;
zSpacing = DicomParser::getZSpacing(files);
......@@ -96,7 +96,7 @@ DicomComponent::DicomComponent(DicomSerie* dicomSerie) throw(AbortException) : I
// create image data corresponding to the component
imageReader = vtkSmartPointer<vtkGDCMImageReader>::New();
if(fileNamesSorted->GetSize() == 1) {
if (fileNamesSorted->GetSize() == 1) {
imageReader->SetFileName(fileNamesSorted->GetValue(0));
}
else {
......@@ -141,7 +141,7 @@ DicomComponent::DicomComponent(DicomSerie* dicomSerie) throw(AbortException) : I
setImageData(image, false, orientation);
// Wait for the LUT update in CamiTK and / or support for color image
if(getLut()) { // sometimes ImageComponent happens not to have a lut, strange behaviour
if (getLut()) { // sometimes ImageComponent happens not to have a lut, strange behaviour
updateLUT();
}
else {
......@@ -153,7 +153,7 @@ DicomComponent::DicomComponent(DicomSerie* dicomSerie) throw(AbortException) : I
// --------------- destructor -------------------
DicomComponent::~DicomComponent() {
if(serie) {
if (serie) {
delete serie;
}
// if(imageReader)
......@@ -183,14 +183,14 @@ camitk::ImageOrientationHelper::PossibleImageOrientations DicomComponent::readDi
gdcm::Scanner scanner;
gdcm::Tag iopTag = gdcm::Tag(0x0020, 0x0037);
scanner.AddTag(iopTag);
if(!scanner.Scan(fileNames)) { // Definitively, scan should never failed, since DicomParser::parseDirectory() has already filter files.
if (!scanner.Scan(fileNames)) { // Definitively, scan should never failed, since DicomParser::parseDirectory() has already filter files.
CAMITK_ERROR("DicomComponent", "readDirectCosinesAngle", "Scan failed looking for tag (0x0020, 0x0037) Image Orientation Patient");
}
// Check value tag exists
gdcm::Scanner::TagToValue const &ttv = scanner.GetMapping(fileNames[0].c_str());
gdcm::Scanner::TagToValue::const_iterator it = ttv.find(iopTag);
if(!(it != ttv.end())) {
if (!(it != ttv.end())) {
CAMITK_WARNING("DicomComponent", "readDirectCosinesAngle", "No tag (0x0020, 0x0037) Image Orientation Patient found on image " + fileNames[0]);
return ImageOrientationHelper::UNKNOWN;
}
......@@ -218,86 +218,86 @@ camitk::ImageOrientationHelper::PossibleImageOrientations DicomComponent::readDi
// return the appropriate ImageOrientation corresponding to this cosines
// we only need to check one component of vector X and Y as they are colinear (other components are 0) to one of the frame vectors
if((x[0] == 1.0) && (y[1] == 1.0)) { // identity matrix => Image frame is the scanner frame
if ((x[0] == 1.0) && (y[1] == 1.0)) { // identity matrix => Image frame is the scanner frame
return ImageOrientationHelper::RAI;
}
// other cases Image frame is different
if(x[0] == 1.0) {
if(y[1] == -1.0) {
if (x[0] == 1.0) {
if (y[1] == -1.0) {
return ImageOrientationHelper::RPS;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::RIP;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::RSA;
}
}
if(x[0] == -1.0) {
if(y[1] == 1.0) {
if (x[0] == -1.0) {
if (y[1] == 1.0) {
return ImageOrientationHelper::LAS;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::LPI;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::LIA;
}
}
if(x[1] == 1.0) {
if(y[0] == 1.0) {
if (x[1] == 1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::ARS;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::ALI;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::AIR;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::ASL;
}
}
if(x[1] == -1.0) {
if(y[0] == 1.0) {
if (x[1] == -1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::PRI;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::PLS;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::PIL;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::PSR;
}
}
if(x[2] == 1.0) {
if(y[0] == 1.0) {
if (x[2] == 1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::IRA;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::ILP;
}
if(y[1] == 1.0) {
if (y[1] == 1.0) {
return ImageOrientationHelper::IAL;
}
if(y[1] == -1.0) {
if (y[1] == -1.0) {
return ImageOrientationHelper::IPR;
}
}
if(x[2] == -1.0) {
if(y[0] == 1.0) {
if (x[2] == -1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::SRP;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::SLA;
}
if(y[1] == 1.0) {
if (y[1] == 1.0) {
return ImageOrientationHelper::SAR;
}
if(y[1] == -1.0) {
if (y[1] == -1.0) {
return ImageOrientationHelper::SPL;
}
}
......@@ -310,10 +310,10 @@ camitk::ImageOrientationHelper::PossibleImageOrientations DicomComponent::readDi
// --------------- roundCosine -------------------
double DicomComponent::roundCosine(const double & value) const {
if(value < -0.5) {
if (value < -0.5) {
return -1.0;
}
if((value >= -0.5) && (value <= 0.5)) {
if ((value >= -0.5) && (value <= 0.5)) {
return 0.0;
}
else {
......
......@@ -76,11 +76,11 @@ Component * DicomComponentExtension::open(const QString & path) throw (AbortExce
QApplication::restoreOverrideCursor();
// Open each selected Dicom as a component
if(!serieDialogEntries.isEmpty()) {
if (!serieDialogEntries.isEmpty()) {
foreach(DicomDialogEntry * entry, serieDialogEntries) {
// Find the corresponding Dicom Serie in the List
foreach(DicomSerie * serie, serieParsed) {
if( (serie->getStudyName() == entry->getStudyName()) &&
if ( (serie->getStudyName() == entry->getStudyName()) &&
(serie->getSerieName() == entry->getSerieName()) ) {
lastOpenedComponent = new DicomComponent(serie);
break;
......
......@@ -37,7 +37,7 @@ DicomDialog::DicomDialog(QList<DicomDialogEntry*> elements): QDialog() {
dicomDialogEntries = elements;
ui.setupUi(this);
if(elements.isEmpty()) {
if (elements.isEmpty()) {
QMessageBox::critical(this, tr("Error"), tr("No DICOM image files found"));
return;
}
......@@ -77,7 +77,7 @@ QList<DicomDialogEntry*> DicomDialog::getSelectedDicomDialogEntries() {
int nbOfElements = ui.tableWidget->rowCount();
for (int row = 0; row < nbOfElements; row++) {
if(ui.tableWidget->item(row, 0)->checkState()) {
if (ui.tableWidget->item(row, 0)->checkState()) {
selectedElements.append(dicomDialogEntries.at(row));
}
}
......
......@@ -55,11 +55,11 @@ QList<DicomSerie*> DicomParser::parseDirectory(const QString & directory) {
CAMITK_DEBUG("DicomParser", "parseDirectory", "Parsing files for DICOM image files");
foreach(std::string file, dicomImageScanner.GetFilenames()) {
// 1st check the file is a valid DICOM file
if(dicomImageScanner.IsKey(file.c_str())) {
if (dicomImageScanner.IsKey(file.c_str())) {
// 2nd check the dicom file is is an image file
gdcm::Scanner::TagToValue const &ttv = dicomImageScanner.GetMapping(file.c_str());
gdcm::Scanner::TagToValue::const_iterator it = ttv.find( tagPixelData );
if( it != ttv.end() ) {
if ( it != ttv.end() ) {
CAMITK_DEBUG("DicomParser", "parseDirectory", file + " is a DICOM image file");
imageFileNames.push_back(file);
}
......@@ -100,7 +100,7 @@ QList<DicomSerie*> DicomParser::parseDirectory(const QString & directory) {
std::vector< std::string > serieFileNames = seriesScanner.GetAllFilenamesFromTagToValue(serieUIDTag, serieName.c_str());
// build a DicomSerie object corresponding to what we have found
if(serieFileNames.size() > 0) {
if (serieFileNames.size() > 0) {
DicomSerie* dicomSerie = new DicomSerie();
dicomSerie->setAcquisitionDate(DicomParser::getAcquisitionDate(serieFileNames));
dicomSerie->setAcquisitionTime(DicomParser::getAcquisitionTime(serieFileNames));
......@@ -224,7 +224,7 @@ double DicomParser::getZSpacing(const std::vector<std::string> & serieFileNames)
std::string file = serieFileNames.at(0);
const char* value = scanner.GetValue(file.c_str(), zSpacingTag);
if(!value) {
if (!value) {
CAMITK_ERROR("DicomParser", "getZSpacing", "No Z spacing found on image: " + serieFileNames.at(0));
return 1.0;
}
......
......@@ -53,7 +53,7 @@ throw (AbortException) : ImageComponent(directoryName) {
void DicomItkComponent::createComponent(const QString directoryName, FilenamesContainerType filenames, QString name) {
if (!directoryName.isEmpty()) {
vtkSmartPointer<vtkImageData> img = readVolume(directoryName, filenames);
if(img) {
if (img) {
setImageData(img, false);
}
setName(name);
......
......@@ -97,7 +97,7 @@ Component * DicomItkComponentExtension::open(const QString & directoryName) thro
findAllDicomSeries(directoryName);
chooseDicomSeriesIds();
std::map<SomeDicomInfo*, FileNamesContainerType>::iterator it;
for(it = theSeries.begin(); it != theSeries.end(); it++) {
for (it = theSeries.begin(); it != theSeries.end(); it++) {
if (it->first->openIt->isChecked()) {
name.clear();
QTextStream(&name) << it->first->protocolName << "_" << nVol;
......@@ -130,7 +130,7 @@ Component * DicomItkComponentExtension::open(const QString & directoryName) thro
}
}
catch(AbortException e) {
catch (AbortException e) {
QMessageBox * msg = new QMessageBox();
msg->setText(QString(e.what()));
msg->show();
......@@ -193,10 +193,10 @@ bool DicomItkComponentExtension::findAllDicomSeries(const QString & directoryNam
DictionaryType::ConstIterator itr = dictionary.Begin();
DictionaryType::ConstIterator end = dictionary.End();
// Write all availaible dicom tags for each series in the console
while( itr != end ) {
while ( itr != end ) {
itk::MetaDataObjectBase::Pointer entry = itr->second;
MetaDataStringType::Pointer entryvalue = dynamic_cast<MetaDataStringType *>( entry.GetPointer() ) ;
if( entryvalue ) {
if ( entryvalue ) {
std::string tagkey = itr->first;
std::string tagname;
itk::GDCMImageIO::GetLabelFromTag(tagkey, tagname);
......
......@@ -62,7 +62,7 @@ DicomTreeSerieComponent::DicomTreeSerieComponent(const std::vector < std::string
gdcm::IPPSorter ippSorter;
ippSorter.SetComputeZSpacing(true);
ippSorter.SetZSpacingTolerance(0.1);
if(!ippSorter.Sort(fileNames))
if (!ippSorter.Sort(fileNames))
CAMITK_ERROR("DicomSerieComponent", "DicomSerieComponent", "IPPSorter sorting failed. Try to adjust Z spacing tolerance.")
vtkSmartPointer<vtkStringArray> fileNamesSorted = vtkSmartPointer<vtkStringArray>::New();
std::vector< std::string > files = ippSorter.GetFilenames();
......@@ -177,86 +177,86 @@ camitk::ImageOrientationHelper::PossibleImageOrientations DicomTreeSerieComponen
// return the appropriate ImageOrientation corresponding to this cosines
// we only need to check one component of vector X and Y as they are colinear (other components are 0) to one of the frame vectors
if((x[0] == 1.0) && (y[1] == 1.0)) { // identity matrix => Image frame is the scanner frame
if ((x[0] == 1.0) && (y[1] == 1.0)) { // identity matrix => Image frame is the scanner frame
return ImageOrientationHelper::RAI;
}
// other cases Image frame is different
if(x[0] == 1.0) {
if(y[1] == -1.0) {
if (x[0] == 1.0) {
if (y[1] == -1.0) {
return ImageOrientationHelper::RPS;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::RIP;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::RSA;
}
}
if(x[0] == -1.0) {
if(y[1] == 1.0) {
if (x[0] == -1.0) {
if (y[1] == 1.0) {
return ImageOrientationHelper::LAS;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::LPI;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::LIA;
}
}
if(x[1] == 1.0) {
if(y[0] == 1.0) {
if (x[1] == 1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::ARS;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::ALI;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::AIR;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::ASL;
}
}
if(x[1] == -1.0) {
if(y[0] == 1.0) {
if (x[1] == -1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::PRI;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::PLS;
}
if(y[2] == 1.0) {
if (y[2] == 1.0) {
return ImageOrientationHelper::PIL;
}
if(y[2] == -1.0) {
if (y[2] == -1.0) {
return ImageOrientationHelper::PSR;
}
}
if(x[2] == 1.0) {
if(y[0] == 1.0) {
if (x[2] == 1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::IRA;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::ILP;
}
if(y[1] == 1.0) {
if (y[1] == 1.0) {
return ImageOrientationHelper::IAL;
}
if(y[1] == -1.0) {
if (y[1] == -1.0) {
return ImageOrientationHelper::IPR;
}
}
if(x[2] == -1.0) {
if(y[0] == 1.0) {
if (x[2] == -1.0) {
if (y[0] == 1.0) {
return ImageOrientationHelper::SRP;
}
if(y[0] == -1.0) {
if (y[0] == -1.0) {
return ImageOrientationHelper::SLA;
}
if(y[1] == 1.0) {
if (y[1] == 1.0) {
return ImageOrientationHelper::SAR;
}
if(y[1] == -1.0) {
if (y[1] == -1.0) {
return ImageOrientationHelper::SPL;
}
}
......@@ -269,10 +269,10 @@ camitk::ImageOrientationHelper::PossibleImageOrientations DicomTreeSerieComponen
// --------------- roundCosine -------------------
double DicomTreeSerieComponent::roundCosine(const double & value) const {
if(value < -0.5) {
if (value < -0.5) {
return -1.0;
}
if((value >= -0.5) && (value <= 0.5)) {
if ((value >= -0.5) && (value <= 0.5)) {
return 0.0;
}
else {
......
......@@ -66,7 +66,7 @@ DicomTreeStudyComponent::DicomTreeStudyComponent(const std::vector< std::string
serieFileNames = ippsorter.GetFilenames();
// std::cout << "SERIE contains (after filering images (IPPSorter)) : " << serieFileNames.size() << " files" << std::endl;
if(serieFileNames.size() > 0) {
if (serieFileNames.size() > 0) {
addChild(new DicomTreeSerieComponent(serieFileNames));
}
}
......
......@@ -74,10 +74,10 @@ Action::ApplyStatus GenerateModel::apply() {
//-- get the mesh, prepare the filename
targetMesh = dynamic_cast<MeshComponent*>( getTargets().last() );
QString originalFilename = targetMesh->getFileName();
if( originalFilename.isEmpty() ) {
if ( originalFilename.isEmpty() ) {
// ask the user
originalFilename = QFileDialog::getSaveFileName( NULL, "Generate Model", "", "ModelingML (*.mml)" );
if( originalFilename.isNull() ) {
if ( originalFilename.isNull() ) {
return ABORTED;
}
}
......@@ -86,11 +86,11 @@ Action::ApplyStatus GenerateModel::apply() {
//-- 0) get the selected node index into an handy list
fixedDOFIndex.clear();
vtkSmartPointer<vtkSelectionNode> currentlySelected = targetMesh->getSelection( "Picked Selection" );
if( currentlySelected != NULL ) {
if ( currentlySelected != NULL ) {
vtkSmartPointer<vtkIdTypeArray> idList = vtkIdTypeArray::SafeDownCast( currentlySelected->GetSelectionList() );
// if the selection is not empty
if( idList != NULL ) {
for( vtkIdType i = 0; i < idList->GetNumberOfTuples(); i++ ) {
if ( idList != NULL ) {
for ( vtkIdType i = 0; i < idList->GetNumberOfTuples(); i++ ) {
fixedDOFIndex.insert( idList->GetValue( i ) );
}
}
......@@ -105,7 +105,7 @@ Action::ApplyStatus GenerateModel::apply() {
saveSOFAFile( baseFilename );
//-- 3) save LML, PML, and MML
if( !property( "SOFA Only" ).toBool() ) {
if ( !property( "SOFA Only" ).toBool() ) {
saveMMLFiles( baseFilename );
}
......@@ -144,12 +144,12 @@ void GenerateModel::saveSOFAFile( QString baseFilename ) {
scnFile << " <DiagonalMass template=\"Vec3d\" name=\"computed using mass density\" massDensity=\"1\" />" << endl;
scnFile << " <TetrahedralCorotationalFEMForceField template=\"Vec3d\" name=\"FEM\" method=\"large\" poissonRatio=\"0.4\" youngModulus=\"5000\" computeGlobalMatrix=\"0\" />" << endl;
if( property( "SOFA Only" ).toBool() && property( "Selection Is Constrained" ).toBool() && fixedDOFIndex.size() > 0 ) {
if ( property( "SOFA Only" ).toBool() && property( "Selection Is Constrained" ).toBool() && fixedDOFIndex.size() > 0 ) {
// Without LML, you would have to do this:
scnFile << " <FixedConstraint template=\"Vec3d\" name=\"FixedConstraint\" indices=\"";
std::set<int>::const_iterator pos;
// preincrement and predecrement are usually faster than postincrement and postdecrement...
for( pos = fixedDOFIndex.begin(); pos != fixedDOFIndex.end(); ++pos ) {
for ( pos = fixedDOFIndex.begin(); pos != fixedDOFIndex.end(); ++pos ) {
scnFile << *pos << " ";
}
......@@ -166,11 +166,11 @@ void GenerateModel::saveSOFAFile( QString baseFilename ) {
void GenerateModel::saveMMLFiles( QString baseFilename ) {
//-- Generate LML
QString lmlFilename;
if( fixedDOFIndex.size() > 0 ) {
if ( fixedDOFIndex.size() > 0 ) {
Loads l;
Translation *t = new Translation();
std::set<int>::const_iterator pos;
for( pos = fixedDOFIndex.begin(); pos != fixedDOFIndex.end(); ++pos ) {
for ( pos = fixedDOFIndex.begin(); pos != fixedDOFIndex.end(); ++pos ) {
t->addTarget( *pos );
}
t->setUnit( TranslationUnit::MM() );
......@@ -220,7 +220,7 @@ void GenerateModel::saveMMLFiles( QString baseFilename ) {
//mmlIn.monitors(monitors);
// add lml
if( fixedDOFIndex.size() > 0 ) {
if ( fixedDOFIndex.size() > 0 ) {
// in the mml the lml fileName is relative
mmlIn.lmlFile( QFileInfo( lmlFilename ).fileName().toStdString().c_str() );
}
......@@ -256,7 +256,7 @@ void GenerateModel::saveMMLFiles( QString baseFilename ) {
if (fixedDOFIndex.size() > 0 && property( "Selection Is Constrained" ).toBool() ) {
StructuralComponent *fixedDof = new StructuralComponent( pml, "Fixed Dof" );
std::set<int>::const_iterator pos;
for( pos = fixedDOFIndex.begin(); pos != fixedDOFIndex.end(); ++pos ) {
for ( pos = fixedDOFIndex.begin(); pos != fixedDOFIndex.end(); ++pos ) {
fixedDof->addStructure( pml->getAtom( *pos ) );
}
pml->getInformativeComponents()->addSubComponent( fixedDof );
......
......@@ -35,7 +35,7 @@ QWidget* SimulationDialog::getWidget() {
MMLComponent * input = dynamic_cast<MMLComponent *> (getTargets().last());
QWidget * myWidget = NULL;
if( input ) {
if ( input ) {
myWidget = input->getMonitoringGuiManager()->getDialog();
// show the widget
myWidget->show();
......
......@@ -59,7 +59,7 @@ PMLExplorerAction::PMLExplorerAction(ActionExtension * extension) : Action(exten
// --------------- destructor -------------------
PMLExplorerAction::~PMLExplorerAction() {
if(pmlExplorerWidget) {
if (pmlExplorerWidget) {
delete pmlExplorerWidget;
}
}
......@@ -77,8 +77,8 @@ QWidget* PMLExplorerAction::getWidget() {
// The action only explores one PML component, here explore the last selected one
// (in case of multi component selection)
PMLComponent *comp = dynamic_cast<PMLComponent*>(getTargets().last());
if(comp) {
if(!pmlExplorerWidget) {
if (comp) {
if (!pmlExplorerWidget) {
pmlExplorerWidget = new PMLExplorerWidget(comp);
}
else {
......
......@@ -199,7 +199,7 @@ int main(int argc, char *argv[]) {
) {
if (argc > 1) {
std::cout << "Argument errors: ";
for(int i = 1; i < argc; i++) {
for (int i = 1; i < argc; i++) {
std::cout << "[" << argv[i] << "] ";
}
}
......
......@@ -96,19 +96,19 @@ main (int argc, char* argv[]) {
outFile.open(out.c_str(), ios::out);
while(current < valMax) {
while (current < valMax) {
cout << "Computation for " << parameterToExplore << " = " << current << endl;
MonitoringManager* m = MonitoringManagerFactory::createManager(mmlFile.c_str());
Properties* prop = m->getPml()->getExclusiveComponents()->getProperties();
std::map<std::string, std::string>::iterator iter;
for(iter = parameters.begin(); iter != parameters.end(); iter++) {
for (iter = parameters.begin(); iter != parameters.end(); iter++) {
prop->set(iter->first, iter->second);
}
prop->set(parameterToExplore, current);
if (m->init()) {
m->doMove();
while(!m->checkStop()) {
while (!m->checkStop()) {
m->doMove();
}
}
......@@ -117,7 +117,7 @@ main (int argc, char* argv[]) {