Changeset 549 for cpp


Ignore:
Timestamp:
07/30/16 02:38:53 (8 years ago)
Author:
Maciej Komosinski
Message:

More correct use of PreconfiguredGenetics?: avoid static objects, create after logger is configured (so warnings can be printed)

Location:
cpp/frams/_demos
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/geno_test.cpp

    r391 r549  
    1717int main(int argc, char*argv[])
    1818{
     19        LoggerToStdout messages_to_stdout(LoggerBase::Enable); //comment this object out to mute error/warning messages
    1920        PreconfiguredGenetics genetics;
    20         LoggerToStdout messages_to_stdout(LoggerBase::Enable); //comment this object out to mute error/warning messages
    2121
    2222        if (argc <= 1)
  • cpp/frams/_demos/genomanipulation.cpp

    r534 r549  
    1616 Sample code: Accessing model elements
    1717*/
    18 
    19 PreconfiguredGenetics genetics;
    2018
    2119void printNiceBanner(const char* title)
     
    267265{
    268266LoggerToStdout messages_to_stdout(LoggerBase::Enable); //redirect model-related errors to stdout
     267PreconfiguredGenetics genetics;
    269268
    270269srand(time(0));
Note: See TracChangeset for help on using the changeset viewer.