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

Unified Diff: core/fxcrt/include/cfx_count_ref.h

Issue 2287313004: Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@moar_better_constness
Patch Set: Casts, Casts, New -> Emplace. Created 4 years, 4 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
« no previous file with comments | « core/fxcrt/cfx_count_ref_unittest.cpp ('k') | core/fxge/agg/fx_agg_driver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/cfx_count_ref.h
diff --git a/core/fxcrt/include/cfx_count_ref.h b/core/fxcrt/include/cfx_count_ref.h
index 954b72bf8820743ffc2b79e0e7f93a70d816c9c6..aac18b166a8254a7f1ab4c45a291c3116d0aa47b 100644
--- a/core/fxcrt/include/cfx_count_ref.h
+++ b/core/fxcrt/include/cfx_count_ref.h
@@ -18,7 +18,7 @@ class CFX_CountRef {
~CFX_CountRef() {}
template <typename... Args>
- ObjClass* New(Args... params) {
+ ObjClass* Emplace(Args... params) {
m_pObject.Reset(new CountedObj(params...));
return m_pObject.Get();
}
@@ -35,7 +35,7 @@ class CFX_CountRef {
template <typename... Args>
ObjClass* GetPrivateCopy(Args... params) {
if (!m_pObject)
- return New(params...);
+ return Emplace(params...);
if (!m_pObject->HasOneRef())
m_pObject.Reset(new CountedObj(*m_pObject));
return m_pObject.Get();
« no previous file with comments | « core/fxcrt/cfx_count_ref_unittest.cpp ('k') | core/fxge/agg/fx_agg_driver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698