Ticket #3190: cppformatmod.patch

File cppformatmod.patch, 2.1 KB (added by fsincos, 8 years ago)

isnan conflict resolved (+- warnings on MSVC), workaround for another warning (d’après historic_bruno)

  • source/third_party/cppformat/format.cpp

    diff --git a/source/third_party/cppformat/format.cpp b/source/third_party/cppformat/format.cpp
    index acd70b2..4dd34a5 100644
    a b  
    11/*
     2 * Slightly modified version of cppformat, by Wildfire Games, for 0 A.D.
     3 * Based on cppformat v2.1.0 from https://github.com/cppformat/cppformat
     4 */
     5
     6/*
    27 Formatting library for C++
    38
    49 Copyright (c) 2012 - 2015, Victor Zverovich
     
    2530 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2631 */
    2732
     33#include "precompiled.h"
     34
    2835#include "format.h"
    2936
    3037#include <string.h>
    class ArgConverter : public fmt::internal::ArgVisitor<ArgConverter<T>, void> {  
    360367  }
    361368
    362369  template <typename U>
     370#ifdef _MSC_VER
     371__pragma(runtime_checks("c", off))
     372#endif
    363373  void visit_any_int(U value) {
    364374    bool is_signed = type_ == 'd' || type_ == 'i';
    365375    using fmt::internal::Arg;
    class ArgConverter : public fmt::internal::ArgVisitor<ArgConverter<T>, void> {  
    385395      }
    386396    }
    387397  }
     398#ifdef _MSC_VER
     399__pragma(runtime_checks("c", restore))
     400#endif
    388401};
    389402
    390403// Converts an integer argument to char for printf.
  • source/third_party/cppformat/format.h

    diff --git a/source/third_party/cppformat/format.h b/source/third_party/cppformat/format.h
    index 568123d..7e1f8a7 100644
    a b  
    11/*
     2 * Slightly modified version of cppformat, by Wildfire Games, for 0 A.D.
     3 * Based on cppformat v2.1.0 from https://github.com/cppformat/cppformat
     4 */
     5
     6/*
    27 Formatting library for C++
    38
    49 Copyright (c) 2012 - 2015, Victor Zverovich
    inline DummyInt signbit(...) { return DummyInt(); }  
    235240inline DummyInt _ecvt_s(...) { return DummyInt(); }
    236241inline DummyInt isinf(...) { return DummyInt(); }
    237242inline DummyInt _finite(...) { return DummyInt(); }
    238 inline DummyInt isnan(...) { return DummyInt(); }
     243//inline DummyInt isnan(...) { return DummyInt(); }
    239244inline DummyInt _isnan(...) { return DummyInt(); }
    240245
    241246// A helper function to suppress bogus "conditional expression is constant"