summaryrefslogtreecommitdiff
path: root/core/fxcodec/lbmp/fx_bmp.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 15:17:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 15:17:30 -0700
commit12f3e4a58f05850b93af35619cb04f0231d86acc (patch)
tree9851d8e46e5c168f5d148864caa2eebf814529dd /core/fxcodec/lbmp/fx_bmp.cpp
parent3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (diff)
downloadpdfium-12f3e4a58f05850b93af35619cb04f0231d86acc.tar.xz
Remove FX_BOOL from core
Review-Url: https://codereview.chromium.org/2477443002
Diffstat (limited to 'core/fxcodec/lbmp/fx_bmp.cpp')
-rw-r--r--core/fxcodec/lbmp/fx_bmp.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/fxcodec/lbmp/fx_bmp.cpp b/core/fxcodec/lbmp/fx_bmp.cpp
index b7f20666d8..9105c6ed9c 100644
--- a/core/fxcodec/lbmp/fx_bmp.cpp
+++ b/core/fxcodec/lbmp/fx_bmp.cpp
@@ -105,7 +105,7 @@ int32_t bmp_read_header(bmp_decompress_struct_p bmp_ptr) {
bmp_ptr->bitCounts =
GetWord_LSBFirst((uint8_t*)&bmp_core_header_ptr->bcBitCount);
bmp_ptr->compress_flag = BMP_RGB;
- bmp_ptr->imgTB_flag = FALSE;
+ bmp_ptr->imgTB_flag = false;
} break;
case kBmpInfoHeaderSize: {
BmpInfoHeaderPtr bmp_info_header_ptr = nullptr;
@@ -130,7 +130,7 @@ int32_t bmp_read_header(bmp_decompress_struct_p bmp_ptr) {
(uint8_t*)&bmp_info_header_ptr->biYPelsPerMeter);
if (bmp_ptr->height < 0) {
bmp_ptr->height = -bmp_ptr->height;
- bmp_ptr->imgTB_flag = TRUE;
+ bmp_ptr->imgTB_flag = true;
}
} break;
default: {
@@ -160,7 +160,7 @@ int32_t bmp_read_header(bmp_decompress_struct_p bmp_ptr) {
(uint8_t*)&bmp_info_header_ptr->biYPelsPerMeter);
if (bmp_ptr->height < 0) {
bmp_ptr->height = -bmp_ptr->height;
- bmp_ptr->imgTB_flag = TRUE;
+ bmp_ptr->imgTB_flag = true;
}
if (bmp_ptr->compress_flag == BMP_RGB && biPlanes == 1 &&
bmp_ptr->color_used == 0) {
@@ -390,7 +390,7 @@ int32_t bmp_decode_rle8(bmp_decompress_struct_p bmp_ptr) {
uint8_t* first_byte_ptr = nullptr;
uint8_t* second_byte_ptr = nullptr;
bmp_ptr->col_num = 0;
- while (TRUE) {
+ while (true) {
uint32_t skip_size_org = bmp_ptr->skip_size;
if (!bmp_read_data(bmp_ptr, &first_byte_ptr, 1))
return 2;
@@ -492,7 +492,7 @@ int32_t bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr) {
uint8_t* first_byte_ptr = nullptr;
uint8_t* second_byte_ptr = nullptr;
bmp_ptr->col_num = 0;
- while (TRUE) {
+ while (true) {
uint32_t skip_size_org = bmp_ptr->skip_size;
if (!bmp_read_data(bmp_ptr, &first_byte_ptr, 1))
return 2;
@@ -896,9 +896,9 @@ static void bmp_encode_rle4(bmp_compress_struct_p bmp_ptr,
dst_buf[dst_pos++] = RLE_EOI;
dst_size = dst_pos;
}
-FX_BOOL bmp_encode_image(bmp_compress_struct_p bmp_ptr,
- uint8_t*& dst_buf,
- uint32_t& dst_size) {
+bool bmp_encode_image(bmp_compress_struct_p bmp_ptr,
+ uint8_t*& dst_buf,
+ uint32_t& dst_size) {
uint32_t head_size = sizeof(BmpFileHeader) + sizeof(BmpInfoHeader);
uint32_t pal_size = sizeof(uint32_t) * bmp_ptr->pal_num;
if (bmp_ptr->info_header.biClrUsed > 0 &&
@@ -908,7 +908,7 @@ FX_BOOL bmp_encode_image(bmp_compress_struct_p bmp_ptr,
dst_size = head_size + sizeof(uint32_t) * bmp_ptr->pal_num;
dst_buf = FX_TryAlloc(uint8_t, dst_size);
if (!dst_buf)
- return FALSE;
+ return false;
FXSYS_memset(dst_buf, 0, dst_size);
bmp_ptr->file_header.bfOffBits = head_size;
@@ -935,5 +935,5 @@ FX_BOOL bmp_encode_image(bmp_compress_struct_p bmp_ptr,
}
bmp_ptr->file_header.bfSize = dst_size;
WriteFileHeader(&bmp_ptr->file_header, dst_buf);
- return TRUE;
+ return true;
}