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

Issue 1090303003: Add missing operators for CFX_ByteStringC. (Closed)

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

Description

Add missing operators for CFX_ByteStringC. Removing the implicit cast operator forces a build breakage should we use ByteStringC in STL containers. Adding an operator< restores correct behaviour. Adding an operator[] avoids re-writing some code to call GetPtr() prior to array indexing. Part 1 of 4. R=thestig@chromium.org TBR=brucedawson@chromium.org BUG=pdfium:142 . Committed: https://pdfium.googlesource.com/pdfium/+/1ddf056da74de0a34631b8a719f4f02b4ec82144

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove spurious include. #

Patch Set 3 : one more test. #

Total comments: 6

Patch Set 4 : Make operator const. #

Patch Set 5 : use size_t #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -27 lines) Patch
M core/include/fxcrt/fx_string.h View 1 2 3 4 6 chunks +17 lines, -10 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxcrt/fx_basic_bstring.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxcrt/fx_basic_bstring_unittest.cpp View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
M core/src/fxcrt/fx_basic_buffer.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
M core/src/fxcrt/fx_basic_maps.cpp View 4 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Tom Sepez
Lei, for review.
5 years, 8 months ago (2015-04-21 19:25:16 UTC) #2
Tom Sepez
https://codereview.chromium.org/1090303003/diff/1/core/include/fxcrt/fx_string.h File core/include/fxcrt/fx_string.h (left): https://codereview.chromium.org/1090303003/diff/1/core/include/fxcrt/fx_string.h#oldcode103 core/include/fxcrt/fx_string.h:103: #define FXBSTR_ID(c1, c2, c3, c4) ((c1 << 24) | ...
5 years, 8 months ago (2015-04-21 19:34:50 UTC) #3
Tom Sepez
+Bruce, just for good measure.
5 years, 8 months ago (2015-04-21 20:03:19 UTC) #5
Lei Zhang
lgtm https://codereview.chromium.org/1090303003/diff/40001/core/include/fxcrt/fx_string.h File core/include/fxcrt/fx_string.h (right): https://codereview.chromium.org/1090303003/diff/40001/core/include/fxcrt/fx_string.h#newcode147 core/include/fxcrt/fx_string.h:147: const FX_BYTE& operator[] (int index) const Can this ...
5 years, 8 months ago (2015-04-21 22:05:51 UTC) #6
brucedawson
There's one bug I noticed that should be fixed. https://codereview.chromium.org/1090303003/diff/40001/core/include/fxcrt/fx_string.h File core/include/fxcrt/fx_string.h (right): https://codereview.chromium.org/1090303003/diff/40001/core/include/fxcrt/fx_string.h#newcode152 core/include/fxcrt/fx_string.h:152: ...
5 years, 8 months ago (2015-04-22 10:36:08 UTC) #7
Tom Sepez
https://codereview.chromium.org/1090303003/diff/40001/core/include/fxcrt/fx_string.h File core/include/fxcrt/fx_string.h (right): https://codereview.chromium.org/1090303003/diff/40001/core/include/fxcrt/fx_string.h#newcode147 core/include/fxcrt/fx_string.h:147: const FX_BYTE& operator[] (int index) const On 2015/04/21 22:05:51, ...
5 years, 8 months ago (2015-04-22 16:54:19 UTC) #8
Tom Sepez
Bruce to TBR during absence.
5 years, 8 months ago (2015-04-22 19:03:25 UTC) #9
Tom Sepez
5 years, 8 months ago (2015-04-22 19:04:19 UTC) #10
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
1ddf056da74de0a34631b8a719f4f02b4ec82144 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698