summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_bidi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_bidi.cpp')
-rw-r--r--core/fxcrt/fx_bidi.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxcrt/fx_bidi.cpp b/core/fxcrt/fx_bidi.cpp
index 49333f6a76..25544546d3 100644
--- a/core/fxcrt/fx_bidi.cpp
+++ b/core/fxcrt/fx_bidi.cpp
@@ -5,10 +5,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fxcrt/fx_bidi.h"
-#include "core/fxcrt/fx_ucd.h"
#include <algorithm>
+#include "core/fxcrt/fx_ucd.h"
+#include "third_party/base/ptr_util.h"
+
CFX_BidiChar::CFX_BidiChar()
: m_CurrentSegment({0, 0, NEUTRAL}), m_LastSegment({0, 0, NEUTRAL}) {}
@@ -50,7 +52,7 @@ void CFX_BidiChar::StartNewSegment(CFX_BidiChar::Direction direction) {
CFX_BidiString::CFX_BidiString(const CFX_WideString& str)
: m_Str(str),
- m_pBidiChar(new CFX_BidiChar),
+ m_pBidiChar(pdfium::MakeUnique<CFX_BidiChar>()),
m_eOverallDirection(CFX_BidiChar::LEFT) {
for (const auto& c : m_Str) {
if (m_pBidiChar->AppendChar(c))