Age | Commit message (Collapse) | Author |
|
Review-Url: https://codereview.chromium.org/2477443002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
Adds string hashes so CFX strings will interoperate with
STL unordered containers.
These will be employed per-document in a subsequent cl.
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2341683005
|
|
Strings are never less than themselves, and this will occur given
the shared CoW nature of these strings.
Review-Url: https://codereview.chromium.org/2347433004
|
|
BUG=
Review-Url: https://codereview.chromium.org/2338623005
|
|
This change contains files in core directory which were not covered
in part I. This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2060913003
|
|
Add missing helper function to CFX_ByteTextBuf to avoid the
anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name
"Make" to indicate there's an allocation going on in this case.
Change some method arguments to take pre-existing ByteStrings where
possible.
Review-Url: https://codereview.chromium.org/1977093002
|
|
BUG=
Review-Url: https://codereview.chromium.org/1979723003
|
|
Review-Url: https://codereview.chromium.org/1874773002
|
|
Most of the time, we want to operate on chars as if they
were unsigned, but there are a few places where we need
the default (questionably signed) values. Consolidate
the casting in a single place rather than forcing callers
to get a char* ptr.
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1972053003
|
|
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1968233002
|
|
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and
assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can
be overridden if the platform requies and we can pickup the Chromium version
if it has already been defined in the build.
This does change behaviour. Currently FXSYS_assert is always defined but ASSERT
is only defined in debug builds. So, the FXSYS_assert's would fire in Release
builds. That will no longer happen.
BUG=pdfium:219
Review-Url: https://codereview.chromium.org/1914303003
|
|
Also identical fixes for CFX_WideString.
Reserve() on an empty string would not actually reserve a
buffer. Currently unused, but there are places where this
would really help.
ReleaseBuffer() would rarely return memory to the system, since
it would short-circuit thinking it could operate in place. Tune
the algorithm slightly so that we hold on when the savings is
small.
Bounds check release buffer args rather than just asserting.
Add tests for all of these.
Review URL: https://codereview.chromium.org/1916303004
|
|
The principle has been implicit in the implementation, but
make it obvious for future generations.
Review URL: https://codereview.chromium.org/1904143002
|
|
BUG=
Review URL: https://codereview.chromium.org/1885973002
|
|
Don't try to copy the string until we are sure we need to
change it.
Review URL: https://codereview.chromium.org/1877993002
|
|
Make Byte and Wide code identical while at it.
Review URL: https://codereview.chromium.org/1877553002
|
|
The naming is redundant given the base type, and will stand
in the way of consolidating Byte and Wide code.
BUG=
Review URL: https://codereview.chromium.org/1862123003
|
|
The few places these are called are better served by explicit
calls to CFX_ByteString() itself. This helps make Byte and
Wide strings more similar.
Also prevents fx_string.h from having any knowledge of fx_basic.h's
ByteTextBuf class.
Review URL: https://codereview.chromium.org/1870043003
|
|
It doesn't persist the string beyond the duration of the
call, hence it should take the *StringC variant. Doing so
avoids some allocs by changing to the *StringC ctor in a few
places, at the cost of some explicit .ToByteStringC() calls
(which are cheap).
Review URL: https://codereview.chromium.org/1862953004
|
|
Shuffled the order of methods in fx_basic_wstring.cpp to
match those in fx_basic_bstring.cpp. The way to review
this patch is to diff those two files against each other.
They are beginning to converge.
Re-ordered some parameters in Concat() so that the string
comes before its length. It feels wrong otherwise.
Review URL: https://codereview.chromium.org/1846793002
|
|
First step in making the same changes to CFX_WideString that we
just made to CFX_ByteString.
Review URL: https://codereview.chromium.org/1844073003
|
|
This CL updates CFX_ByteStringC to use the more common c_str
and raw_str instead of GetCStr and GetPtr.
Review URL: https://codereview.chromium.org/1857713003
|
|
This reverts commit b33dfdf68bafa30e90a65fb71ff6b343202e0561.
BUG=
Review URL: https://codereview.chromium.org/1848993002
|
|
Makes the code slightly cleaner.
Review URL: https://codereview.chromium.org/1846083002
|
|
Needed to validate refactoring which was reverted.
Review URL: https://codereview.chromium.org/1847193002
|
|
This reverts commit ac88953dfa7c1a68c69989d61d7bc03c0595064b.
Reason for revert: Strings borked.
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1852453004
|
|
This moves the reference counts from an ad-hoc mechanism
to being automatically tracked.
Also:
Make StringData::Create() always return non-null.
Add better ctors for StringData itself.
Consolidate copies into StringData methods.
Simplify the concat() code.
Rename/reorder some parameter names to be simpler.
Review URL: https://codereview.chromium.org/1810823002
|
|
Review URL: https://codereview.chromium.org/1832173003
|
|
This CL moves the fxcrt code into the core/fxcrt directory. The only exception
was fx_bidi.h which was moved into core/fxcrt as it is not used outside of
core/.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1825953002 .
|
|
This CL moves the core/src/ files up to core/ and fixes up the include guards,
includes and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1800523005 .
|