Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Unified Diff: core/fxcrt/fx_extension.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: s/NULL/nullptr/ Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fxcrt/fx_extension.cpp
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
index 197022362fcc408dca6ce6e6e1c79a6c720d0f17..069932449da5cbfda18075d1ea0d480de0bef588 100644
--- a/core/fxcrt/fx_extension.cpp
+++ b/core/fxcrt/fx_extension.cpp
@@ -68,12 +68,12 @@ FX_BOOL CFX_CRTFileStream::Flush() {
#ifdef PDF_ENABLE_XFA
IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath) {
if (wsPath.GetLength() == 0)
- return NULL;
+ return nullptr;
- CFX_CRTFileAccess* pFA = NULL;
+ CFX_CRTFileAccess* pFA = nullptr;
Tom Sepez 2016/06/02 20:09:49 nit combine
Lei Zhang 2016/06/07 07:33:23 Done.
pFA = new CFX_CRTFileAccess;
- if (NULL == pFA)
- return NULL;
+ if (nullptr == pFA)
Tom Sepez 2016/06/02 20:09:49 can't happen
Lei Zhang 2016/06/07 07:33:23 Done.
+ return nullptr;
pFA->Init(wsPath);
return pFA;
@@ -305,9 +305,9 @@ void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount) {
FX_HashCode_GetA(CFX_ByteStringC((uint8_t*)&st2, sizeof(st2)), true);
::srand((dwHash1 << 16) | (uint32_t)dwHash2);
#else
- time_t tmLast = time(NULL);
+ time_t tmLast = time(nullptr);
time_t tmCur;
- while ((tmCur = time(NULL)) == tmLast) {
+ while ((tmCur = time(nullptr)) == tmLast) {
continue;
}
@@ -319,8 +319,9 @@ void FX_Random_GenerateBase(uint32_t* pBuffer, int32_t iCount) {
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
FX_BOOL FX_GenerateCryptoRandom(uint32_t* pBuffer, int32_t iCount) {
- HCRYPTPROV hCP = NULL;
- if (!::CryptAcquireContext(&hCP, NULL, NULL, PROV_RSA_FULL, 0) || !hCP) {
+ HCRYPTPROV hCP = nullptr;
+ if (!::CryptAcquireContext(&hCP, nullptr, nullptr, PROV_RSA_FULL, 0) ||
+ !hCP) {
return FALSE;
}
::CryptGenRandom(hCP, iCount * sizeof(uint32_t), (uint8_t*)pBuffer);

Powered by Google App Engine
This is Rietveld 408576698