summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-19 19:00:43 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-19 19:00:43 +0000
commit58c2c144c5ac6a7397573d2f25d1ba9c79bc4f15 (patch)
tree438cd4c32e367e1433d5e5f01896984d564f67c2 /core/fxcrt
parent9ccf08746e57a03fd9afc187cb3e23404cdc88bb (diff)
downloadpdfium-58c2c144c5ac6a7397573d2f25d1ba9c79bc4f15.tar.xz
Remove some dead code.
Change-Id: I8edb14c024860c66b5e6c014136393e71e38387d Reviewed-on: https://pdfium-review.googlesource.com/21570 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/cfx_binarybuf.cpp20
-rw-r--r--core/fxcrt/cfx_binarybuf.h2
-rw-r--r--core/fxcrt/fx_coordinates.cpp6
-rw-r--r--core/fxcrt/fx_coordinates.h1
4 files changed, 0 insertions, 29 deletions
diff --git a/core/fxcrt/cfx_binarybuf.cpp b/core/fxcrt/cfx_binarybuf.cpp
index 3673fa58d4..1243593a77 100644
--- a/core/fxcrt/cfx_binarybuf.cpp
+++ b/core/fxcrt/cfx_binarybuf.cpp
@@ -12,11 +12,6 @@
CFX_BinaryBuf::CFX_BinaryBuf()
: m_AllocStep(0), m_AllocSize(0), m_DataSize(0) {}
-CFX_BinaryBuf::CFX_BinaryBuf(size_t size)
- : m_AllocStep(0), m_AllocSize(size), m_DataSize(size) {
- m_pBuffer.reset(FX_Alloc(uint8_t, size));
-}
-
CFX_BinaryBuf::~CFX_BinaryBuf() {}
void CFX_BinaryBuf::Delete(size_t start_index, size_t count) {
@@ -77,18 +72,3 @@ void CFX_BinaryBuf::AppendBlock(const void* pBuf, size_t size) {
}
m_DataSize += size;
}
-
-void CFX_BinaryBuf::InsertBlock(size_t pos, const void* pBuf, size_t size) {
- if (size <= 0)
- return;
-
- ExpandBuf(size);
- memmove(m_pBuffer.get() + pos + size, m_pBuffer.get() + pos,
- m_DataSize - pos);
- if (pBuf) {
- memcpy(m_pBuffer.get() + pos, pBuf, size);
- } else {
- memset(m_pBuffer.get() + pos, 0, size);
- }
- m_DataSize += size;
-}
diff --git a/core/fxcrt/cfx_binarybuf.h b/core/fxcrt/cfx_binarybuf.h
index 1a1c821bb9..2d4f019560 100644
--- a/core/fxcrt/cfx_binarybuf.h
+++ b/core/fxcrt/cfx_binarybuf.h
@@ -16,7 +16,6 @@
class CFX_BinaryBuf {
public:
CFX_BinaryBuf();
- explicit CFX_BinaryBuf(size_t size);
virtual ~CFX_BinaryBuf();
uint8_t* GetBuffer() const { return m_pBuffer.get(); }
@@ -36,7 +35,6 @@ class CFX_BinaryBuf {
m_pBuffer.get()[m_DataSize++] = byte;
}
- void InsertBlock(size_t pos, const void* pBuf, size_t size);
void Delete(size_t start_index, size_t count);
// Releases ownership of |m_pBuffer| and returns it.
diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp
index 733425ef26..db4bea945f 100644
--- a/core/fxcrt/fx_coordinates.cpp
+++ b/core/fxcrt/fx_coordinates.cpp
@@ -313,12 +313,6 @@ float CFX_Matrix::TransformXDistance(float dx) const {
return sqrt(fx * fx + fy * fy);
}
-float CFX_Matrix::TransformDistance(float dx, float dy) const {
- float fx = a * dx + c * dy;
- float fy = b * dx + d * dy;
- return sqrt(fx * fx + fy * fy);
-}
-
float CFX_Matrix::TransformDistance(float distance) const {
return distance * (GetXUnit() + GetYUnit()) / 2;
}
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index 55d28cd66f..c53d157610 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -644,7 +644,6 @@ class CFX_Matrix {
CFX_FloatRect GetUnitRect() const;
float TransformXDistance(float dx) const;
- float TransformDistance(float dx, float dy) const;
float TransformDistance(float distance) const;
CFX_PointF Transform(const CFX_PointF& point) const;