summaryrefslogtreecommitdiff
path: root/core/include/fxcrt/fx_basic.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-01 13:49:28 -0700
committerLei Zhang <thestig@chromium.org>2015-10-01 13:49:28 -0700
commit022da0014faa103901ec107ed6a33e5ab00c7931 (patch)
tree3f117f805fbff77cd11cf4bde5aafca3e22eeee9 /core/include/fxcrt/fx_basic.h
parentce37d7347f1ab4c9fc1f48a137628da641bb4f14 (diff)
downloadpdfium-022da0014faa103901ec107ed6a33e5ab00c7931.tar.xz
Clean up some image decoder classes:
- Use std::vector<uint8_t> instead of raw uint8_t* - Make ICodec_ScanlineDecoder::GetScanline() return const uint8_t* - Add FxFreeDeleter, use it in CCodec_ImageDataCache. - Make CCodec_ImageDataCache encapsulate its data members. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1361053002 .
Diffstat (limited to 'core/include/fxcrt/fx_basic.h')
-rw-r--r--core/include/fxcrt/fx_basic.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 3e556f5439..7412b8db3c 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -947,6 +947,10 @@ class CFX_AutoRestorer {
T m_OldValue;
};
+struct FxFreeDeleter {
+ inline void operator()(void* ptr) const { FX_Free(ptr); }
+};
+
// Used with nonstd::unique_ptr to Release() objects that can't be deleted.
template <class T>
struct ReleaseDeleter {