Changeset 835


Ignore:
Timestamp:
12/05/18 21:02:00 (7 days ago)
Author:
Maciej Komosinski
Message:

ISO C++17 compliance including NULL, nullptr, templates and pointer conversions

Location:
cpp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpp/PrintFloat/Dragon4.h

    r823 r835  
    5656tU32 Dragon4
    5757(
    58     tU64        mantissa,           // value significand
    59     tS32        exponent,           // value exponent in base 2
    60     tU32        mantissaHighBitIdx, // index of the highest set mantissa bit
    61     tB          hasUnequalMargins,  // is the high margin twice as large as the low margin
    62     tCutoffMode cutoffMode,         // how to determine output length
     58        const tU64        mantissa,           // value significand
     59        const tS32        exponent,           // value exponent in base 2
     60        const tU32        mantissaHighBitIdx, // index of the highest set mantissa bit
     61        const tB          hasUnequalMargins,  // is the high margin twice as large as the low margin
     62    const tCutoffMode cutoffMode,         // how to determine output length
    6363    tU32        cutoffNumber,       // parameter to the selected cutoffMode
    6464    tC8 *       pOutBuffer,         // buffer to output into
  • cpp/common/nonstd_math.cpp

    r492 r835  
    1313
    1414
    15 
    16 #if (defined __BORLANDC__ || (_MSC_VER <= 1700)) & (!defined EMSCRIPTEN)
    17 double round(double val) //http://stackoverflow.com/questions/2170385/c-math-functions
    18 {   
    19     return floor(val + 0.5);
    20 }
    21 #endif
    2215
    2316
  • cpp/common/nonstd_math.h

    r665 r835  
    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-2018  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    1717#endif
    1818
    19 #if (defined __BORLANDC__ || (_MSC_VER <= 1700)) & (!defined EMSCRIPTEN)
    20   double round(double val);  //http://stackoverflow.com/questions/2170385/c-math-functions
    21 #endif
    2219
    2320
     
    7067
    7168#endif
     69
  • cpp/frams/genetics/fH/fH_general.cpp

    r821 r835  
    417417        if (sticks.size() == 1)
    418418        {
    419                 stickconnections.push_back(pair<fH_StickHandle *, fH_StickHandle *>(NULL, sticks[0]));
     419                stickconnections.push_back(pair<fH_StickHandle *, fH_StickHandle *>(nullptr, sticks[0]));
    420420                sticksorder.push_back(0);
    421421                return;
     
    457457
    458458        // two found handles are the beginning of creature body
    459         stickconnections.push_back(pair<fH_StickHandle *, fH_StickHandle *>(NULL, left));
     459        stickconnections.push_back(pair<fH_StickHandle *, fH_StickHandle *>(nullptr, left));
    460460        stickconnections.push_back(pair<fH_StickHandle *, fH_StickHandle *>(left, right));
    461461
Note: See TracChangeset for help on using the changeset viewer.