summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/color.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-23 09:59:05 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-23 15:26:17 +0000
commitfc54e054811510c3d7c8a9c6af6c90c3222c7029 (patch)
tree98025207bd4d1f397be489fe54c42b148cf40137 /fpdfsdk/javascript/color.cpp
parenta0061afa12e0fec210727c9478adb8ac78c5d63c (diff)
downloadpdfium-fc54e054811510c3d7c8a9c6af6c90c3222c7029.tar.xz
Cleanup PWL_Utils.
This CL removes unused methods, moves methods to correct files and removes unused defines. Change-Id: I5087869b451e57d5325831814f0fa1c7f222cf4d Reviewed-on: https://pdfium-review.googlesource.com/2823 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/color.cpp')
-rw-r--r--fpdfsdk/javascript/color.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp
index 4fbec5b7c4..b5ccbadabf 100644
--- a/fpdfsdk/javascript/color.cpp
+++ b/fpdfsdk/javascript/color.cpp
@@ -248,8 +248,7 @@ bool color::convert(CJS_Runtime* pRuntime,
}
CJS_Array aDest;
- CPWL_Color crDest = crSource;
- crDest.ConvertColorType(nColorType);
+ CPWL_Color crDest = crSource.ConvertColorType(nColorType);
ConvertPWLColorToArray(pRuntime, crDest, &aDest);
vRet = CJS_Value(pRuntime, aDest);
@@ -274,7 +273,7 @@ bool color::equal(CJS_Runtime* pRuntime,
CPWL_Color color2;
ConvertArrayToPWLColor(pRuntime, array1, &color1);
ConvertArrayToPWLColor(pRuntime, array2, &color2);
- color1.ConvertColorType(color2.nColorType);
+ color1 = color1.ConvertColorType(color2.nColorType);
vRet = CJS_Value(pRuntime, color1 == color2);
return true;
}