Skip to content

Commit

Permalink
Fixed a bug where not initializing initial boolean values caused it t…
Browse files Browse the repository at this point in the history
…o be true instead of false.
  • Loading branch information
samidhtalsania committed Oct 18, 2016
1 parent 05d6fe9 commit 6d8c36f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
9 changes: 3 additions & 6 deletions src/lpexec_src/FileConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ FileConfig::FileConfig(){
configFile.open(filename);

if(!configFile.is_open()){
#ifdef DEBUG
cout<<"Cannot read from config file\n";
#endif
// ofstream file;
// file.open(filename);
// file.close();
ofstream file;
file.open(filename);
file.close();
fileCouldNotBeOpened = true;
}

Expand Down
9 changes: 4 additions & 5 deletions src/lpexec_src/lpexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ int main(int argc, char **argv)
map<string, string> aoptions ;
map<string, string> coptions ;

bool execute_alch ;
bool execute_cli ;
bool execute_tuf ;
bool execute_alch = false;
bool execute_cli = false;
bool execute_tuf = false;

set<string> lpset;
set<string> alchset;
Expand All @@ -124,13 +124,12 @@ int main(int argc, char **argv)
aoptions = cf.getaoptions();
coptions = cf.getcoptions();


// Execute cli is true by default
execute_alch = cf.getExecuteAlch();
execute_cli = cf.getExecuteCli();
execute_tuf = false;
}
catch(NoLanguageSelectedException ex){
catch(...){
// No solver is specified in the config file. Need to pick it up from command line.

//Default for lpmln: Solver is MLN, Input is MVSM
Expand Down

0 comments on commit 6d8c36f

Please sign in to comment.