File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef UTILS_H
2
2
#define UTILS_H
3
3
4
+ #include < iostream>
4
5
#include < cstdlib>
5
6
#include < string>
6
7
#include < cstring>
@@ -37,17 +38,17 @@ string getCurrentDate()
37
38
struct tm tStruct;
38
39
localtime_s (&tStruct, &t);
39
40
40
- return std:: to_string (tStruct.tm_mday ) + " -" + std:: to_string (tStruct.tm_mon + 1 ) + " -" + std:: to_string (tStruct.tm_year + 1900 );
41
+ return to_string (tStruct.tm_mday ) + " -" + to_string (tStruct.tm_mon + 1 ) + " -" + to_string (tStruct.tm_year + 1900 );
41
42
}
42
43
43
- size_t strlcpy (char *dst, const char *src, size_t dstsize = std:: numeric_limits<size_t >::max())
44
+ size_t strlcpy (char *dst, const char *src, size_t dstsize = numeric_limits<size_t >::max())
44
45
{
45
- size_t srclen = std:: strlen (src);
46
+ size_t srclen = strlen (src);
46
47
size_t copylen = (srclen >= dstsize) ? dstsize - 1 : srclen;
47
48
48
49
if (dstsize != 0 )
49
50
{
50
- std:: memcpy (dst, src, copylen);
51
+ memcpy (dst, src, copylen);
51
52
dst[copylen] = ' \0 ' ; // Null-terminate the destination buffer
52
53
}
53
54
You can’t perform that action at this time.
0 commit comments