Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3111)

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp

Issue 1540693002: Get rid of a few CPDF_Object Create() methods and just use new instead. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
index 10b0272b5246211dc5e2f5f07105b0d8e95db52b..2b68a0403f9aca5d37e1b68490153c4e82dc045b 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
@@ -33,7 +33,7 @@ CPDF_Dictionary* CPDF_Image::InitJPEG(uint8_t* pData, FX_DWORD size) {
csname = "DeviceRGB";
} else if (num_comps == 4) {
csname = "DeviceCMYK";
- CPDF_Array* pDecode = CPDF_Array::Create();
+ CPDF_Array* pDecode = new CPDF_Array;
for (int n = 0; n < 4; n++) {
pDecode->AddInteger(1);
pDecode->AddInteger(0);
@@ -151,7 +151,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap,
pBuf[4] = (FX_CHAR)set_g;
pBuf[5] = (FX_CHAR)set_b;
ct.ReleaseBuffer(6);
- pCS->Add(CPDF_String::Create(ct, TRUE));
+ pCS->Add(new CPDF_String(ct, TRUE));
pDict->SetAt("ColorSpace", pCS);
}
pDict->SetAtInteger("BitsPerComponent", 1);
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698