Ignore:
Timestamp:
04/16/21 15:55:34 (3 years ago)
Author:
Maciej Komosinski
Message:

Used std::min(), std::max() explicitly to avoid compiler confusion. Used std::size() explicitly instead of the equivalent macro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/canvas/neurodiagram.cpp

    r973 r1130  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    1313#include <frams/simul/simul.h>
    1414#include "common/nonstd_time.h"
     15#include <algorithm>
    1516
    1617#define FIELDSTRUCT NeuroDiagram
     
    231232        NeuroProbe *probe = new NeuroProbe(getNS(i));
    232233        Pixel s = getSize();
    233         s.x = s.y = max(probe->getSize().x, min(s.x / 3, s.y / 3));
     234        s.x = s.y = std::max(probe->getSize().x, std::min(s.x / 3, s.y / 3));
    234235        probes += (void*)probe;
    235236        add(probe);
     
    503504                                int *dr = drawing;
    504505                                int w = size.x - 2, h = size.y - clienttop - clientbottom;
    505                                 int scale = min(w, h);
     506                                int scale = std::min(w, h);
    506507                                int x0 = clienttop + leftborder + ((w > h) ? (w - h) / 2 : 0);
    507508                                int y0 = clientleft + topborder + ((h > w) ? (h - w) / 2 : 0);
Note: See TracChangeset for help on using the changeset viewer.