From e84e61852a4f3d8d7551d0eab3619916085fb557 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 20 Jun 2018 14:20:23 +0000 Subject: c_str() calls not needed when writing to ostream c_str() is a bit of a code smell, esp. since Byte/Wide strings know how to do this all by themselves. Change-Id: I9c86cee42c12a3f72ddb1d410a91cf25647d0ce6 Reviewed-on: https://pdfium-review.googlesource.com/35530 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/edit') diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index ba8d03d7f9..80b121a572 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -391,7 +391,7 @@ void CPDF_PageContentGenerator::ProcessDefaultGraphics( << static_cast(CFX_GraphStateData::LineCapButt) << " J " << static_cast(CFX_GraphStateData::LineJoinMiter) << " j\n"; ByteString name = GetOrCreateDefaultGraphics(); - *buf << "/" << PDF_NameEncode(name).c_str() << " gs "; + *buf << "/" << PDF_NameEncode(name) << " gs "; } ByteString CPDF_PageContentGenerator::GetOrCreateDefaultGraphics() const { -- cgit v1.2.3