summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_basicmodule.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-16 05:21:13 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-16 05:21:13 +0000
commit2e2acbdc523735fdbbf69b1f9fee9a24e4303045 (patch)
tree8faa4479c0e73771fc816791a97aa4c83f8769a1 /core/fxcodec/codec/ccodec_basicmodule.h
parent6ea4d08b905de5fab7dc64f35b0abf745a1db3f3 (diff)
downloadpdfium-2e2acbdc523735fdbbf69b1f9fee9a24e4303045.tar.xz
Make {A85,RunLength}Encode()'s buffer out parameter a unique_ptr.
Change-Id: I3f06ea7ed39c8a8fff57e07f14ff6c21bedbc028 Reviewed-on: https://pdfium-review.googlesource.com/c/43998 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_basicmodule.h')
-rw-r--r--core/fxcodec/codec/ccodec_basicmodule.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxcodec/codec/ccodec_basicmodule.h b/core/fxcodec/codec/ccodec_basicmodule.h
index 2ad374037f..72dd016d44 100644
--- a/core/fxcodec/codec/ccodec_basicmodule.h
+++ b/core/fxcodec/codec/ccodec_basicmodule.h
@@ -9,6 +9,7 @@
#include <memory>
+#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_system.h"
#include "third_party/base/span.h"
@@ -24,11 +25,11 @@ class CCodec_BasicModule {
int bpc);
bool RunLengthEncode(pdfium::span<const uint8_t> src_buf,
- uint8_t** dest_buf,
+ std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
uint32_t* dest_size);
bool A85Encode(pdfium::span<const uint8_t> src_buf,
- uint8_t** dest_buf,
+ std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
uint32_t* dest_size);
};