summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/color.cpp
diff options
context:
space:
mode:
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;
}