From dd1bfe4b1438be802eb10a7de52ed77d8b9f32ac Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 16 Jan 2017 06:07:54 -0800 Subject: Use FX_Alloc() properly in fxcodec. It already has a sizeof() and a cast built into the macro, so we don't need to do sizeof() and cast on each usage. Review-Url: https://codereview.chromium.org/2625133009 --- core/fxcodec/codec/fx_codec_png.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fxcodec/codec') diff --git a/core/fxcodec/codec/fx_codec_png.cpp b/core/fxcodec/codec/fx_codec_png.cpp index 0b55a97dbe..579c85bf09 100644 --- a/core/fxcodec/codec/fx_codec_png.cpp +++ b/core/fxcodec/codec/fx_codec_png.cpp @@ -197,7 +197,7 @@ static void _png_get_row_func(png_structp png_ptr, } FXPNG_Context* CCodec_PngModule::Start(void* pModule) { - FXPNG_Context* p = (FXPNG_Context*)FX_Alloc(uint8_t, sizeof(FXPNG_Context)); + FXPNG_Context* p = FX_Alloc(FXPNG_Context, 1); if (!p) return nullptr; -- cgit v1.2.3