summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cttfontdesc.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-21 15:54:37 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-21 23:05:40 +0000
commit350d2d904a3e6bd1e96542c5e223d301d9bdbe6a (patch)
tree3c8db80e8f718155d55180870be9fb17e47f31d4 /core/fxge/ge/cttfontdesc.cpp
parent1629f609d3722f25491bbbb53b2cce97a03a5867 (diff)
downloadpdfium-350d2d904a3e6bd1e96542c5e223d301d9bdbe6a.tar.xz
Use unique_ptr in CFX_FontMgr::m_FaceMap.
Change-Id: Ie34942e6e577dfa270417b17c59a51813f310d27 Reviewed-on: https://pdfium-review.googlesource.com/4436 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/ge/cttfontdesc.cpp')
-rw-r--r--core/fxge/ge/cttfontdesc.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/fxge/ge/cttfontdesc.cpp b/core/fxge/ge/cttfontdesc.cpp
index 269abfe7f7..f75039567f 100644
--- a/core/fxge/ge/cttfontdesc.cpp
+++ b/core/fxge/ge/cttfontdesc.cpp
@@ -34,9 +34,5 @@ int CTTFontDesc::ReleaseFace(FXFT_Face face) {
if (i == 16)
return -1;
}
- m_RefCount--;
- if (m_RefCount)
- return m_RefCount;
- delete this;
- return 0;
+ return --m_RefCount;
}