Ignore:
Timestamp:
04/09/15 23:51:28 (10 years ago)
Author:
Maciej Komosinski
Message:
  • explicit c_str() in SString instead of (const char*) cast
  • genetic converters and GenMan? are now thread-local which enables multi-threaded simulator separation
Location:
cpp/frams/_demos/geometry
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/geometry/apices_test.cpp

    r286 r348  
    4747        // Finishing result Model and printing its genotype.
    4848        resultModel.close();
    49         puts((const char*)resultModel.getF0Geno().toString());
     49        puts(resultModel.getF0Geno().toString().c_str());
    5050}
    5151
  • cpp/frams/_demos/geometry/geometrytestutils.cpp

    r318 r348  
    2525               
    2626                fprintf(stderr, "%d. (%6d chars) %s\n", count, genotype->genotype.len(),
    27                         (const char*)genotype->name);
     27                        genotype->name.c_str());
    2828        }
    2929       
    3030        if (loader.getStatus() == MiniGenotypeLoader::OnError)
    3131        {
    32                 fprintf(stderr, "Error: %s\n", (const char*)loader.getError());
     32                fprintf(stderr, "Error: %s\n", loader.getError().c_str());
    3333                return 2;
    3434        }
     
    5858                count++;
    5959               
    60                 if ((genoIndex == count) || (strcmp((const char*)genotype->name, genoName) == 0))
     60                if ((genoIndex == count) || (strcmp(genotype->name.c_str(), genoName) == 0))
    6161                {
    6262                        Model model(genotype->genotype);
     
    7575        if (loader.getStatus() == MiniGenotypeLoader::OnError)
    7676        {
    77                 fprintf(stderr, "Error: %s\n", (const char*)loader.getError());
     77                fprintf(stderr, "Error: %s\n", loader.getError().c_str());
    7878                return 2;
    7979        }
     
    156156                "GENO_ID - either genotype name or index (1-based)\n"
    157157                "SHAPE - 1=ellipsoid, 2=cuboid, 3=cylinder, others or none=random\n",
    158                 (const char*)header);
     158                header.c_str());
    159159        return 1;
    160160}
     
    220220                "DENSITY - minimal number of samples per unit\n"
    221221                "SHAPE - 1=ellipsoid, 2=cuboid, 3=cylinder, others or none=random\n",
    222                 (const char*)header);
     222                header.c_str());
    223223        return 1;
    224224}
  • cpp/frams/_demos/geometry/info_test.cpp

    r286 r348  
    7272        // Finishing result Model and printing its genotype.
    7373        resultModel.close();
    74         puts((const char*)resultModel.getF0Geno().toString());
     74        puts(resultModel.getF0Geno().toString().c_str());
    7575       
    7676        // Printing calculated values.
  • cpp/frams/_demos/geometry/surface_test.cpp

    r286 r348  
    4747        // Finishing result Model and printing its genotype.
    4848        resultModel.close();
    49         puts((const char*)resultModel.getF0Geno().toString());
     49        puts(resultModel.getF0Geno().toString().c_str());
    5050}
    5151
  • cpp/frams/_demos/geometry/volume_test.cpp

    r286 r348  
    3939        // Finishing result Model and printing its genotype.
    4040        resultModel.close();
    41         puts((const char*)resultModel.getF0Geno().toString());
     41        puts(resultModel.getF0Geno().toString().c_str());
    4242}
    4343
Note: See TracChangeset for help on using the changeset viewer.