Cleanup JBig2_GeneralDecoder.cpp.
authorLei Zhang <thestig@chromium.org>
Tue, 15 Sep 2015 08:12:55 +0000 (01:12 -0700)
committerLei Zhang <thestig@chromium.org>
Tue, 15 Sep 2015 08:12:55 +0000 (01:12 -0700)
commitd15cda90f598ce52fa601552577ef7fd8a89fce3
treeca3c4fbe610afbb3c3a346b5c4fbf3f4c6136a9c
parenta5fde67ea3c9d20d3f19354ec9e7e1be600d7589
Cleanup JBig2_GeneralDecoder.cpp.

- FX_Alloc() can't fail and return.
- Use unique_ptr / remove gotos.
- NULL -> nullptr.
- Combine common code.

R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1337823003 .
core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h