Suppress MSVC warning C4267 (#519)
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 02 Apr 2015 12:57:18 +0200
changeset 113818c89646185e
parent 1137 f05270f176d9
child 1139 d51126dc39fa
Suppress MSVC warning C4267 (#519)

C4267: conversion from 'size_t' to 'type', possible loss of data
CMakeLists.txt
lemon/arg_parser.h
lemon/core.h
lemon/counter.h
     1.1 --- a/CMakeLists.txt	Thu Apr 02 10:03:35 2015 +0200
     1.2 +++ b/CMakeLists.txt	Thu Apr 02 12:57:18 2015 +0200
     1.3 @@ -150,10 +150,13 @@
     1.4      SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
     1.5    ELSEIF(MSVC)
     1.6      # This part is unnecessary 'casue the same is set by the lemon/core.h.
     1.7 -    # Still keep it as an example.
     1.8 -    SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
     1.9 +    # Still kept as an example.
    1.10 +
    1.11 +    # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996")
    1.12 +
    1.13      # Suppressed warnings:
    1.14      # C4250: 'class1' : inherits 'class2::member' via dominance
    1.15 +    # C4267: conversion from 'size_t' to 'type', possible loss of data
    1.16      # C4355: 'this' : used in base member initializer list
    1.17      # C4503: 'function' : decorated name length exceeded, name was truncated
    1.18      # C4800: 'type' : forcing value to bool 'true' or 'false'
     2.1 --- a/lemon/arg_parser.h	Thu Apr 02 10:03:35 2015 +0200
     2.2 +++ b/lemon/arg_parser.h	Thu Apr 02 12:57:18 2015 +0200
     2.3 @@ -26,6 +26,7 @@
     2.4  #include <iostream>
     2.5  #include <sstream>
     2.6  #include <algorithm>
     2.7 +#include <lemon/core.h>
     2.8  #include <lemon/assert.h>
     2.9  
    2.10  ///\ingroup misc
     3.1 --- a/lemon/core.h	Thu Apr 02 10:03:35 2015 +0200
     3.2 +++ b/lemon/core.h	Thu Apr 02 12:57:18 2015 +0200
     3.3 @@ -29,12 +29,13 @@
     3.4  
     3.5  // Disable the following warnings when compiling with MSVC:
     3.6  // C4250: 'class1' : inherits 'class2::member' via dominance
     3.7 +// C4267: conversion from 'size_t' to 'type', possible loss of data
     3.8  // C4355: 'this' : used in base member initializer list
     3.9  // C4503: 'function' : decorated name length exceeded, name was truncated
    3.10  // C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
    3.11  // C4996: 'function': was declared deprecated
    3.12  #ifdef _MSC_VER
    3.13 -#pragma warning( disable : 4250 4355 4503 4800 4996 )
    3.14 +#pragma warning( disable : 4250 4267 4355 4503 4800 4996 )
    3.15  #endif
    3.16  
    3.17  #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
     4.1 --- a/lemon/counter.h	Thu Apr 02 10:03:35 2015 +0200
     4.2 +++ b/lemon/counter.h	Thu Apr 02 12:57:18 2015 +0200
     4.3 @@ -22,6 +22,8 @@
     4.4  #include <string>
     4.5  #include <iostream>
     4.6  
     4.7 +#include <lemon/core.h>
     4.8 +
     4.9  ///\ingroup timecount
    4.10  ///\file
    4.11  ///\brief Tools for counting steps and events