Browse Source

Cleaned up some logical expressions for clarity.

git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@35 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfc
master
madscientist 15 years ago
parent
commit
16f5e640f4
3 changed files with 7 additions and 4 deletions
  1. 4
    1
      SNF4CGP/ConfigurationEngine.cpp
  2. 2
    2
      SNF4CGP/ExecutiveProcess.cpp
  3. 1
    1
      SNF4CGP/main.cpp

+ 4
- 1
SNF4CGP/ConfigurationEngine.cpp View File

const int OutOfRangeDefaultCode = 0; const int OutOfRangeDefaultCode = 0;
ResultConfiguration& ConfigurationManager::ConfigurationForResultCode(int Code) { ResultConfiguration& ConfigurationManager::ConfigurationForResultCode(int Code) {
if(0 > Code || HighestResultCode < Code) Code = OutOfRangeDefaultCode;
bool CodeIsNegative = (0 > Code);
bool CodeIsTooBig = (HighestResultCode < Code);
bool CodeIsOutOfRange = (CodeIsNegative || CodeIsTooBig);
if(CodeIsOutOfRange) Code = OutOfRangeDefaultCode;
return Configurations[Code]; return Configurations[Code];
} }

+ 2
- 2
SNF4CGP/ExecutiveProcess.cpp View File

shutdownOutput(); shutdownOutput();
shutdownJobPool(); shutdownJobPool();
cout << "* SNF4CGP Shutdown completed." << endl; cout << "* SNF4CGP Shutdown completed." << endl;
if(0 < QuitJobNumber) {
cout << QuitJobNumber << " OK" << endl;
if(0 < QuitJobNumber) { // If processing ended with QUIT
cout << QuitJobNumber << " OK" << endl; // then respond appropriately.
} }
cout.flush(); cout.flush();
} }

+ 1
- 1
SNF4CGP/main.cpp View File

using namespace std; // Introduce standard namespace. using namespace std; // Introduce standard namespace.
const string SNF4CGP_VERSION_INFO = "SNF4CGP Version 0.0.3 Build: " __DATE__ " " __TIME__;
const string SNF4CGP_VERSION_INFO = "SNF4CGP Version 0.0.4 Build: " __DATE__ " " __TIME__;
const int ConfigPathArgNumber = 1; const int ConfigPathArgNumber = 1;
const int CorrectArgcNumber = 2; const int CorrectArgcNumber = 2;

Loading…
Cancel
Save