Ignore:
Timestamp:
04/16/21 15:55:34 (4 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/common/loggers/loggertostdout.cpp

    r875 r1130  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
    55#include "loggertostdout.h"
    66#include <common/console.h>
     7#include <algorithm>
    78#include <assert.h>
    89#ifdef SHP
     
    3839        {
    3940                assert((level>=LOG_MIN) && (level<=LOG_MAX));
    40                 level = min(LOG_MAX, max(LOG_MIN, level));
     41                level = std::min(LOG_MAX, std::max(LOG_MIN, level));
    4142                printf(log_format, log_level[level + 1], obj, method, msg, "\n");
    4243        }
Note: See TracChangeset for help on using the changeset viewer.