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

Issue 1117263004: Make sure string constructors are efficient on literals (Closed)

Created:
5 years, 7 months ago by Tom Sepez
Modified:
5 years, 7 months ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make sure string constructors are efficient on literals Separate out the overload when the length is not known, and be sure that strlen() call is in the header so that strlen("foo") => 3 (since many compilers support this optimization). Also delete some unused types. BUG=pdfium:151 R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/2cf0d21788974dd1ea19a68259c4fbccb0e56897

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -29 lines) Patch
M core/include/fxcrt/fx_string.h View 4 chunks +12 lines, -14 lines 1 comment Download
M core/src/fxcrt/fx_basic_wstring.cpp View 2 chunks +13 lines, -15 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Tom Sepez
Lei, more string changes.
5 years, 7 months ago (2015-05-05 20:26:27 UTC) #2
Lei Zhang
lgtm https://codereview.chromium.org/1117263004/diff/1/core/include/fxcrt/fx_string.h File core/include/fxcrt/fx_string.h (right): https://codereview.chromium.org/1117263004/diff/1/core/include/fxcrt/fx_string.h#newcode207 core/include/fxcrt/fx_string.h:207: CFX_ByteString(FX_LPCSTR ptr) We should mark a whole bunch ...
5 years, 7 months ago (2015-05-05 21:31:56 UTC) #3
Tom Sepez
> https://codereview.chromium.org/1117263004/diff/1/core/include/fxcrt/fx_string.h#newcode207 > core/include/fxcrt/fx_string.h:207: CFX_ByteString(FX_LPCSTR ptr) > We should mark a whole bunch of these ...
5 years, 7 months ago (2015-05-05 22:11:16 UTC) #4
Tom Sepez
5 years, 7 months ago (2015-05-05 22:15:43 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
2cf0d21788974dd1ea19a68259c4fbccb0e56897 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698