Enhance conding style

This commit is contained in:
Jonny007-MKD 2014-01-07 20:28:18 +01:00
parent e1614a62e6
commit e61c4be44c

View file

@ -17,30 +17,27 @@ void Wertetabelle::Print()
{ {
printHeader(); printHeader();
int w = (uint)ceil(log10((float)numElements));
for (uint i = 0; i < numElements; i++) for (uint i = 0; i < numElements; i++)
{ {
cout << "| "; // => | cout << "| "; // => |
cout << setfill(' ') << setw((uint)ceil(log10((float)numElements))) << i; // => 4 cout << setfill(' ') << setw(w) << i; // => 4
cout << " |"; // => | cout << " |"; // => |
*fot << "| "; // => | *fot << "| "; // => |
*fot << setfill(' ') << setw((uint)ceil(log10((float)numElements))) << i; // => 4 *fot << setfill(' ') << setw(w) << i; // => 4
*fot << " |"; // => | *fot << " |"; // => |
this->printI(i); // => 0 1 0 0 this->printI(i); // => 0 1 0 0
cout << "| "; // => | cout << "| "; // => |
cout << ((*this->cells)[i]->value ^ KNF); // => 1 cout << ((*this->cells)[i]->value ^ KNF); // => 1
cout << " |"; // => | cout << " |"; // => |
*fot << "| "; // => | *fot << "| "; // => |
*fot << ((*this->cells)[i]->value ^ KNF); // => 1 *fot << ((*this->cells)[i]->value ^ KNF); // => 1
*fot << " |"; // => | *fot << " |"; // => |
this->printPrimImplikanten(i); // => 0 0x1 4 this->printPrimImplikanten(i); // => 0 0x1 4
cout << endl; // ==> | 4 | 0 1 0 0 | 1 | 0 0x1 4 cout << endl; // ==> | 4 | 0 1 0 0 | 1 | 0 0x1 4
*fot << endl; // ==> | 4 | 0 1 0 0 | 1 | 0 0x1 4 *fot << endl; // ==> | 4 | 0 1 0 0 | 1 | 0 0x1 4
this->printI(i); // => 0 1 0 0
this->printPrimImplikanten(i); // => 0 0x1 4
if (i > 0 && i % 31 == 0 && numElements - i > 5) // reprint header so you dont have to scroll if (i > 0 && i % 31 == 0 && numElements - i > 5) // reprint header so you dont have to scroll
//cout << this->makeHeader() << endl;
printHeader(); printHeader();
} }