Age | Commit message (Collapse) | Author |
|
I have kept the old mispelled constant for backwards compatibility
Change-Id: I128a2eec76d00cc5ef058cd6a0c35a7474d2411e
Reviewed-on: https://gerrit.libreoffice.org/39995
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e
Reviewed-on: https://gerrit.libreoffice.org/39587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iac7ca87e05228f3a2a187646496869a8b1bff602
Reviewed-on: https://gerrit.libreoffice.org/38436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to markup dtors that coverity warns might throw exceptions
which won't throw in practice, or where std::terminate is
an acceptable response if they do
Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4
Reviewed-on: https://gerrit.libreoffice.org/38318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
run it against sal,cppu,cppuhelper
I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.
Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic96b64244f817196ccdfe06b97f7f31291adf372
|
|
The long-term benefit will be support of C++11 char16_t string literals (for
cases of string literals with non-ASCII content) once we drop any compilers that
don't support those yet. The short-term benefit is support for an improved
OUStringLiteral1 that accepts any sal_Unicode value, not just ASCII ones (see
next commit).
Change-Id: I3f8f6697d7eb62b5176b7e812b5a5113c53b83a4
Reviewed-on: https://gerrit.libreoffice.org/28445
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I6c656f991999791469015500aff1905fdb16ba65
|
|
...and fix its documentation, and use it throughout the code base.
Change-Id: I349bc2009b1b0aa7115ea90bc6ecd0a812f63698
|
|
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
|
|
lcov over make check showed
98 4699997 : sal_Int32 rtl_ustr_indexOfAscii_WithLength(
99 : sal_Unicode const * str, sal_Int32 len,
100 : char const * subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
101 : {
102 4699997 : assert(len >= 0);
103 4699997 : assert(subLen >= 0);
104 4699997 : if (subLen > 0 && subLen <= len) {
105 : sal_Int32 i;
106 54014537 : for (i = 0; i <= len - subLen; ++i) {
107 51036513 : if (rtl_ustr_asciil_reverseEquals_WithLength(
108 51036523 : str + i, subStr, subLen))
109 : {
110 205482 : return i;
111 : }
112 : }
113 : }
114 4494505 : return -1;
115 : }
so
1/ in 95% of the cases the result is not-found.. _that_ is the hot path
2/ we are calling rtl_ustr_asciil_reverseEquals_WithLength close to 11 times
per call.. (average ~ len - subLen, due to the high miss ratio)
so let's first search for the first byte of the substring
to optimize the 'miss' case, which is the most common one.
Change-Id: I20ef0821db2ff0db5935dd562844a947a14aff64
Reviewed-on: https://gerrit.libreoffice.org/16763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ib34196185f90204a71598f2c659c3fddce7a0e4d
|
|
Change-Id: I745b09d8a248f08afdd3387f4cfcf69d71ec3c39
|
|
Change-Id: I5f525d91ce24d1d2653a6855f1c4fffc039ae398
|
|
Change-Id: Iec781bdbbf216cb14c9ba5be5955123273d7699c
|
|
Change-Id: I9fad024e4b5c8a4ca272f2387df07351198cf5dc
|
|
Change-Id: Ifc03631b126ec19cb98cb42a258ca4880e868385
|
|
Change-Id: I6e48e2593f93efd71e84a076a99457c3daf7d9e0
|
|
Change-Id: I0eccec058f506be69f6c95a1a6d97be64cb734bc
|
|
Change-Id: Ie9a37e7eb837abf0d2783a9a0f8c2b33a6772d33
|
|
Also remove some now redundant asserts from headers.
Some of these actually trigger on unit tests so are commented out.
Change-Id: I07c6b2b2bd175361691a141f22eec584e3ab8f0b
|
|
Change-Id: Ifd23373b1ac4919793d1b4251ed90cf2dd6f2bda
|
|
breaks windows build otherwise (fatal erro C1017)
Change-Id: Idae78c621bfb8f989eb33220f015e17a7b7fb92f
|
|
...and there is no reason for such a precond for rtl_string_newFromLiteral
Change-Id: I27f7217c8db17cef860c37886d0f7e561dc852f8
|
|
Change-Id: I9793f697f14118340bc6db89540fe50ad0b8ccbd
|
|
This addresses some cppcheck warnings.
Change-Id: Id5f90757571e76a2c05a4cbd37020e1f6a6b2033
Reviewed-on: https://gerrit.libreoffice.org/13544
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I0d4f9b14f2a41a3acb08ba1b6c13fdf1174021e7
|
|
...because rtl_ImplGetFastUTF8UnicodeLen has already checked that.
Change-Id: I17f2b80f374073934a8f0b1a97099d4dec89ce4e
|
|
Keep the fast path fast, fall back to the text encoder in case there's a
fly in the ointment.
Change-Id: I94507856a7f3170f770adb741aa1e282d0d2400c
|
|
Change-Id: I0eae089be1bde9db822a77bea482c10650c8a137
|
|
...as flagged by -fsanitize=undefined. But is it really undefined?
[conv.double] "If the source value is between two adjacent destination values,
the result of the conversion is an implementation-defined choice of either of
those values." So if the double is between std::numeric_limits<float>::max()
and std::numeric_limits<float>::infinity()...
Change-Id: I6389c8ac4a922991e240638d231dd2a39e173882
|
|
...which did not work e.g. for broken single-byte input 0x80.
Change-Id: I4dff41e4f18dfce376695b438004c2af853cf4fa
|
|
Change-Id: I071a931660dafc1ee5950da527b042fb175255b8
|
|
Change-Id: Ie972599650620324fa7af5ed2b2843bfc1f34c43
|
|
Change-Id: Ife8ebbb5e46704c5d2ff46cc345b4ed926e7dc12
|
|
Change-Id: I76be464200d486efef9c8a7e957c310c9adae3b8
|
|
Document the "calling" macros for the strtmpl.cxx template file.
And remove unnecessary use of those macros in the calling file.
Change-Id: I20e0dd74150773363b9fb557884b84692ce22f11
Reviewed-on: https://gerrit.libreoffice.org/6504
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I63c32289c7ac6a428c8c50e49650fbac98c8c5e3
|
|
...as its assert requires that both input characters are ASCII, which need not
be the case in these compareIgnoreAsciiCase functions. (Even if they take one
literal argument that must be strictly ASCII, the other argument can be an
arbitrary Unicode string in the case of OUString or an arbitrary 8-bit string in
the case of OString).
The logically correct version of rtl::compareAsciiIgnoreCase would arguably be
one that requires its two arguments to be valid UTF-32 code units, but that
could not be used in these places either, as for OUString they operate on
individual UTF-16 code units.
rtl::compareAsciiIgnoreCase likely makes less sense after all than assumed in
c8e39e66528affb66f1ae121fa36dd4ab31a9b0b "Introduce rtl::compareIgnoreCase and
deprecate rtl/character.hxx equivalents," which this commit partly reverts.
Change-Id: Ib2eed3a1896e83d9c66b0479a03f9ec51e1c4dc0
|
|
Change-Id: Id90935fd2b0f904f89477792edc8140cfc31e91f
Reviewed-on: https://gerrit.libreoffice.org/5412
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
|
|
This adds RTL_LOG_STRING_INTERN_NEW and RTL_LOG_STRING_INTERN_DELETE
which are connected to SDT probes if available. It introduces two new
SDT probes. new_string_intern_16 and delete_string_intern_16
(there is currently no interning for 8-bit rtl_Strings).
For consistency both have the same 4 arguments as new_string_(8|16)
and delete_string_(8|16). new_string_intern_16 has as 5th argument
the address of the original rtl_uString being interned (which may
or may not be the same as $arg1).
Change-Id: Ib117bba932c1908abc70a7fdd4140c0af76d54cb
Reviewed-on: https://gerrit.libreoffice.org/5308
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I938259f90aee9d277c9ff5b72c9120b93311cbd3
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I03de46fb6c095bb176fd25fc5f803be6d2d89bcf
|