Changeset 1005 for cpp/frams


Ignore:
Timestamp:
07/14/20 15:54:43 (4 years ago)
Author:
Maciej Komosinski
Message:

Higher conformance with C++17, but gave up after missing M_PI, M_PI_2, strdup() and more; other cosmetic improvements

Location:
cpp/frams
Files:
4 edited

Legend:

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

    r1004 r1005  
    1919{
    2020        LoggerToStdout messages_to_stdout(LoggerBase::Enable);
    21         typedef double *pDouble;
    2221        int iCurrParam = 0; // index of the currently processed parameter
    2322        char *szCurrParam = NULL;
     
    172171        double **aaSimil = NULL; // array of similarities
    173172
    174         // create the empty array of similarities
    175         aaSimil = new pDouble[pvGenos.size()];
     173        // create an empty array of similarities
     174        aaSimil = new double*[pvGenos.size()];
    176175        for (unsigned int k = 0; k < pvGenos.size(); k++)
    177176        {
     
    181180        }
    182181
    183         // compute and remember similarities
     182        // compute and store similarities
    184183        for (unsigned int i = 0; i < pvGenos.size(); i++)
    185184        {
     
    193192        if (bPrintNames)
    194193        {
    195                 // if "-names" switch was given, print the number of genotypes and their names
     194                // if the "-names" switch was given, print the number of genotypes and their names
    196195                printf("%li\n", pvGenos.size());
    197196                for (unsigned int iGen = 0; iGen < pvNames.size(); iGen++)
  • cpp/frams/genetics/f9/f9_oper.cpp

    r974 r1005  
    66#include "f9_conv.h"
    77#include <common/nonstd.h> //rndUint, rndDouble
     8#include <string.h>
    89
    910
  • cpp/frams/param/paramobj.cpp

    r792 r1005  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    66#include <frams/util/extvalue.h>
    77#include <common/nonstd_stl.h>
    8 
     8       
    99static const char* maybedup(bool dup, const char* src)
    1010{
  • cpp/frams/util/extvalue.cpp

    r973 r1005  
    705705                fpExceptDisable();
    706706                double tmp = getDouble() / a;
    707                 if (!finite(tmp))
     707                if (!std::isfinite(tmp))
    708708                {
    709709                        logPrintf("ExtValue", "divide", LOG_ERROR, "Overflow %s/%g", getString().c_str(), a); setInvalid();
Note: See TracChangeset for help on using the changeset viewer.