From 1bc0e1820e4b5436f2a911bd612141e48f2b8069 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 16 Dec 2021 17:02:20 -0500 Subject: [PATCH] fix build on older c++ --- src/zm_time.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_time.cpp b/src/zm_time.cpp index 9d4c281c4..041962003 100644 --- a/src/zm_time.cpp +++ b/src/zm_time.cpp @@ -28,7 +28,7 @@ std::string SystemTimePointToString(SystemTimePoint tp) { std::string timeString; timeString.reserve(64); - char *timePtr = timeString.data(); + char *timePtr = &*(timeString.begin()); tm tp_tm = {}; timePtr += strftime(timePtr, timeString.capacity(), "%x %H:%M:%S", localtime_r(&tp_sec, &tp_tm)); snprintf(timePtr, timeString.capacity() - (timePtr - timeString.data()), ".%06" PRIi64, static_cast(now_frac.count())); @@ -44,7 +44,7 @@ std::string TimePointToString(TimePoint tp) { std::string timeString; timeString.reserve(64); - char *timePtr = timeString.data(); + char *timePtr = &*(timeString.begin()); tm tp_tm = {}; timePtr += strftime(timePtr, timeString.capacity(), "%x %H:%M:%S", localtime_r(&tp_sec, &tp_tm)); snprintf(timePtr, timeString.capacity() - (timePtr - timeString.data()), ".%06" PRIi64, static_cast(now_frac.count()));