Use size_t indices in CFX_WideTextBuf::Delete()

- Rename CFX_BinaryBuf::Delete() to avoid confusion.

Change-Id: I229d164ad1c3f8ac95842b8c34dd952c8040e919
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90691
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/cfx_binarybuf.cpp b/core/fxcrt/cfx_binarybuf.cpp
index 718b263..512c64c 100644
--- a/core/fxcrt/cfx_binarybuf.cpp
+++ b/core/fxcrt/cfx_binarybuf.cpp
@@ -40,7 +40,7 @@
   return *this;
 }
 
-void CFX_BinaryBuf::Delete(size_t start_index, size_t count) {
+void CFX_BinaryBuf::DeleteBuf(size_t start_index, size_t count) {
   if (!m_pBuffer || count > m_DataSize || start_index > m_DataSize - count)
     return;
 
diff --git a/core/fxcrt/cfx_binarybuf.h b/core/fxcrt/cfx_binarybuf.h
index d5a54f3..d633d8a 100644
--- a/core/fxcrt/cfx_binarybuf.h
+++ b/core/fxcrt/cfx_binarybuf.h
@@ -45,13 +45,12 @@
     m_pBuffer.get()[m_DataSize++] = byte;
   }
 
-  void Delete(size_t start_index, size_t count);
-
   // Releases ownership of |m_pBuffer| and returns it.
   std::unique_ptr<uint8_t, FxFreeDeleter> DetachBuffer();
 
  protected:
   void ExpandBuf(size_t size);
+  void DeleteBuf(size_t start_index, size_t count);
 
   size_t m_AllocStep = 0;
   size_t m_AllocSize = 0;
diff --git a/core/fxcrt/cfx_widetextbuf.cpp b/core/fxcrt/cfx_widetextbuf.cpp
index c1ff03f..42e1003 100644
--- a/core/fxcrt/cfx_widetextbuf.cpp
+++ b/core/fxcrt/cfx_widetextbuf.cpp
@@ -36,8 +36,8 @@
   new_span[0] = ch;
 }
 
-void CFX_WideTextBuf::Delete(int start_index, int count) {
-  CFX_BinaryBuf::Delete(start_index * sizeof(wchar_t), count * sizeof(wchar_t));
+void CFX_WideTextBuf::Delete(size_t start_index, size_t count) {
+  DeleteBuf(start_index * sizeof(wchar_t), count * sizeof(wchar_t));
 }
 
 CFX_WideTextBuf& CFX_WideTextBuf::operator<<(ByteStringView ascii) {
diff --git a/core/fxcrt/cfx_widetextbuf.h b/core/fxcrt/cfx_widetextbuf.h
index 7f8a0f8..223e8c6 100644
--- a/core/fxcrt/cfx_widetextbuf.h
+++ b/core/fxcrt/cfx_widetextbuf.h
@@ -24,7 +24,7 @@
   WideString MakeString() const;
 
   void AppendChar(wchar_t wch);
-  void Delete(int start_index, int count);
+  void Delete(size_t start_index, size_t count);
 
   CFX_WideTextBuf& operator<<(ByteStringView ascii);
   CFX_WideTextBuf& operator<<(const wchar_t* lpsz);