From 1d5e4ff03cecf8ed2dee2d31752ab4fbb0031d62 Mon Sep 17 00:00:00 2001 From: kusugawa Date: Fri, 10 Jul 2020 18:18:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81VS2015,=E5=8E=BB=E6=8E=89sran?= =?UTF-8?q?d(time(0))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/platform/compiler/Microsoft.h | 4 +++- inc/hgl/type/List.cpp | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/hgl/platform/compiler/Microsoft.h b/inc/hgl/platform/compiler/Microsoft.h index 01150d8..b44740e 100644 --- a/inc/hgl/platform/compiler/Microsoft.h +++ b/inc/hgl/platform/compiler/Microsoft.h @@ -4,13 +4,15 @@ #define HGL_COMPILER_NAME OS_TEXT("Microsoft C/C++") #define HGL_LIB_COMPILER_NAME OS_TEXT("MSC") -#if _MSC_VER < 1910 //Visual C++ 2017 +#if _MSC_VER < 1900 //Visual C++ 2017 #error Please upgrade your compiler or development tools to Microsoft C/C++ 19.1 (Visual C++ 2017) or later. #else #if _MSC_VER >= 1920 #define HGL_LIB_COMPILER_VERSION OS_TEXT("19.2") //Visual C++ 2019 #elif _MSC_VER >= 1910 #define HGL_LIB_COMPILER_VERSION OS_TEXT("19.1") //Visual C++ 2017 + #elif _MSC_VER >= 1900 + #define HGL_LIB_COMPILER_VERSION OS_TEXT("19.0") //Visual C++ 2015 #else #define HGL_LIB_COMPILER_VERSION OS_TEXT("Unknow") #endif//_MSC_VER diff --git a/inc/hgl/type/List.cpp b/inc/hgl/type/List.cpp index 7792411..7a80302 100644 --- a/inc/hgl/type/List.cpp +++ b/inc/hgl/type/List.cpp @@ -46,7 +46,6 @@ namespace hgl if(!items||count<=0) return(false); #ifdef _WIN32 - srand( time(0) ); memcpy(&ti,items+(rand()%count),sizeof(T)); #else memcpy(&ti,items+(lrand48()%count),sizeof(T));