summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-20 14:20:23 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-20 14:20:23 +0000
commite84e61852a4f3d8d7551d0eab3619916085fb557 (patch)
treec94e8da5b1a1cc1af831cf23288786153e509eb2 /core
parentb6e0117285a918f4f2f3a350b8a648d2247d3d8e (diff)
downloadpdfium-e84e61852a4f3d8d7551d0eab3619916085fb557.tar.xz
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 <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
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<int>(CFX_GraphStateData::LineCapButt) << " J "
<< static_cast<int>(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 {