Kaydet (Commit) 99e4145c authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#120703 (PVS): redundant nullptr check

V668 There is no sense in testing the 'pResult' pointer against null, as
     the memory was allocated using the 'new' operator. The exception will
     be generated in the case of memory allocation error.

Change-Id: I8c80df7100e6cdf6c3c51957e3bef3c8a9f30732
Reviewed-on: https://gerrit.libreoffice.org/62137
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst b9d06c89
......@@ -215,8 +215,7 @@ std::shared_ptr<BitmapCache> PageCacheManager::GetCache (
Recycle(pResult, pDocument,rPreviewSize);
// Put the new (or old) cache into the container.
if (pResult != nullptr)
mpPageCaches->emplace(aKey, pResult);
mpPageCaches->emplace(aKey, pResult);
return pResult;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment