summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-04 14:33:06 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-08 04:52:43 +0000
commitb096c53d593a313a6372bffb35f45cdc0e1ffd21 (patch)
tree31b9eb39439c6fb0055c167b1105489728ae6bbf /src/corelib/tools/qbytearray.cpp
parent78f234d5dd7face13dd88fd777fa27497590b34d (diff)
QtCore: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I211703189ff12f827d94914093369736b6e65d4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.cpp')
-rw-r--r--src/corelib/tools/qbytearray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 9b648adb06..adfa939cc6 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -268,7 +268,7 @@ char *qstrcpy(char *dst, const char *src)
{
if (!src)
return 0;
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#ifdef Q_CC_MSVC
const int len = int(strlen(src));
// This is actually not secure!!! It will be fixed
// properly in a later release!
@@ -304,7 +304,7 @@ char *qstrncpy(char *dst, const char *src, uint len)
if (!src || !dst)
return 0;
if (len > 0) {
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#ifdef Q_CC_MSVC
strncpy_s(dst, len, src, len - 1);
#else
strncpy(dst, src, len);