Replace 0 with NULL for some MSVC-specific code
This commit is contained in:
parent
dab3a2f858
commit
6699559320
@ -5048,8 +5048,8 @@ PUGI_IMPL_NS_BEGIN
|
|||||||
PUGI_IMPL_FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
|
PUGI_IMPL_FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
|
||||||
{
|
{
|
||||||
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
|
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
|
||||||
FILE* file = 0;
|
FILE* file = NULL;
|
||||||
return _wfopen_s(&file, path, mode) == 0 ? file : 0;
|
return _wfopen_s(&file, path, mode) == 0 ? file : NULL;
|
||||||
#else
|
#else
|
||||||
return _wfopen(path, mode);
|
return _wfopen(path, mode);
|
||||||
#endif
|
#endif
|
||||||
@ -5099,8 +5099,8 @@ PUGI_IMPL_NS_BEGIN
|
|||||||
PUGI_IMPL_FN FILE* open_file(const char* path, const char* mode)
|
PUGI_IMPL_FN FILE* open_file(const char* path, const char* mode)
|
||||||
{
|
{
|
||||||
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
|
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
|
||||||
FILE* file = 0;
|
FILE* file = NULL;
|
||||||
return fopen_s(&file, path, mode) == 0 ? file : 0;
|
return fopen_s(&file, path, mode) == 0 ? file : NULL;
|
||||||
#else
|
#else
|
||||||
return fopen(path, mode);
|
return fopen(path, mode);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user