Changeset 360 for cpp/frams/_demos


Ignore:
Timestamp:
04/18/15 17:29:17 (10 years ago)
Author:
Maciej Komosinski
Message:

Source formatting

File:
1 edited

Legend:

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

    r359 r360  
    66#include <frams/util/sstringutils.h>
    77#include <frams/genetics/preconfigured.h>
    8 #include <frams/errmgr/stdouterr.h>
     8#include <frams/errmgr/stdouterr.cpp>
    99
    1010/**
     
    1313
    1414 \include geno_test.cpp
    15 */
     15 */
    1616
    17 int main(int argc,char*argv[])
     17int main(int argc, char*argv[])
    1818{
    19 PreconfiguredGenetics genetics;
    20 StdoutErrorHandler stdouterr; //comment this object out to mute error/warning messages
     19        PreconfiguredGenetics genetics;
     20        StdoutErrorHandler stdouterr; //comment this object out to mute error/warning messages
    2121
    22 if (argc<=1)
     22        if (argc <= 1)
    2323        {
    24         puts("no genotype");
    25         return 10;
     24                puts("no genotype");
     25                return 10;
    2626        }
    27 SString gen(argv[1]);
    28 if (!strcmp(gen.c_str(),"-"))
     27        SString gen(argv[1]);
     28        if (!strcmp(gen.c_str(), "-"))
    2929        {
    30         gen=0;
    31         StdioFILEDontClose in(stdin);
    32         loadSString(&in,gen);
     30                gen = 0;
     31                StdioFILEDontClose in(stdin);
     32                loadSString(&in, gen);
    3333        }
    34 Geno g(gen);
    35 puts(g.isValid()?"valid":"invalid");
    36 return !g.isValid();
     34        Geno g(gen);
     35        puts(g.isValid() ? "valid" : "invalid");
     36        return !g.isValid();
    3737}
Note: See TracChangeset for help on using the changeset viewer.