ref: ed62d01609d74585a76862dea115ea24200b1d27
parent: efdb58dae55057fa552746070e859f8c43614016
author: Martin Storsjö <[email protected]>
date: Fri Apr 11 07:10:09 EDT 2014
Use _CRT_SECURE_NO_WARNINGS to avoid warnings in the encoder version of read_config.cpp as well This is clearer and requires less code than using the pragmas for disabling warnings.
--- a/codec/console/enc/src/read_config.cpp
+++ b/codec/console/enc/src/read_config.cpp
@@ -38,15 +38,11 @@
*
*****************************************************************************/
+#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include "read_config.h"
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable:4996)
-#endif
-
CReadConfig::CReadConfig()
: m_pCfgFile (NULL)
, m_strCfgFileName ("")
@@ -141,7 +137,3 @@
const string& CReadConfig::GetFileName() {
return m_strCfgFileName;
}
-
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif