Remove _CRT_SECURE_NO_WARNINGS macro usage in example code, fix any errors arising from disabling this. (#1265)
This commit is contained in:
Родитель
0ff7816bd7
Коммит
4a91d794b2
|
@ -1,5 +1,3 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include <memory>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// #define _CRTDBG_MAP_ALLOC
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
//#include <stdlib.h>
|
||||
//#include <crtdbg.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#define API_KEY "99999999999999999999999999999999-99999999-9999-9999-9999-999999999999-9999"
|
||||
|
||||
#include <cstdio>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "LogManager.hpp"
|
||||
|
@ -44,7 +42,7 @@ void DebugPrintf(const char *fmt, ...)
|
|||
va_start(args, fmt);
|
||||
int nBuf;
|
||||
char szBuffer[512];
|
||||
nBuf = _vsnprintf(szBuffer, 511, fmt, args);
|
||||
nBuf = _vsnprintf_s(szBuffer, 511, fmt, args);
|
||||
// ::OutputDebugStringA(szBuffer);
|
||||
PrintLine(szBuffer);
|
||||
va_end(args);
|
||||
|
@ -231,7 +229,6 @@ EventProperties CreateSampleEvent(const char *name, EventPriority prio) {
|
|||
|
||||
// Prepare current time in UTC (seconds precision)
|
||||
std::time_t t = std::time(nullptr);
|
||||
std::gmtime(&t);
|
||||
|
||||
/* С++11 constructor for Visual Studio 2015: this is the most JSON-lookalike syntax that makes use of C++11 initializer lists. */
|
||||
EventProperties props(name,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
#include "LogManager.hpp"
|
||||
|
|
|
@ -11,7 +11,7 @@ static void DebugPrintf(const char *fmt, ...)
|
|||
va_list args;
|
||||
va_start(args, fmt);
|
||||
int nBuf;
|
||||
nBuf = _vsnprintf(szBuffer, MAX_BUFF_SIZE-1, fmt, args);
|
||||
nBuf = _vsnprintf_s(szBuffer, MAX_BUFF_SIZE-1, fmt, args);
|
||||
::OutputDebugStringA(szBuffer);
|
||||
::OutputDebugStringA("\n"); // eppend endl
|
||||
va_end(args);
|
||||
|
|
Загрузка…
Ссылка в новой задаче