Fredrik Roubert
0178a07a26
ICU-22793 Clang-Tidy: google-readability-casting
...
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/google/readability-casting.html
2024-07-04 22:32:12 +02:00
Fredrik Roubert
53568e8dfc
ICU-22520 Refactor CharString & CharStringByteSink into helper.
...
The repeated sequence of allocating a CharString and CharStringByteSink,
before calling some function that writes into this, can be moved into a
single shared helper function which then is used to give all ulocimp.h
functions that write to ByteSink an overload that instead returns a
CharString, to make call sites look like perfectly normal C++ code.
2024-03-05 23:44:50 +01:00
Fredrik Roubert
939f08f274
ICU-22520 Use C++ function signatures for internal C++ functions.
...
Some of this code was originally written as C code and some of this code
was originally written as C++ code but made to resemble the then already
existing code that had once been C code. Changing it all to normal C++
now will make it easier and safer to work with going forward.
· Use unnamed namespace instead of static.
· Use reference instead of non-nullable pointer.
· Use bool instead of UBool.
· Use constexpr for static data.
· Use U_EXPORT instead of U_CAPI or U_CFUNC.
· Use the default calling convention instead of U_EXPORT2.
2024-02-12 21:44:06 +01:00
Fredrik Roubert
037449fff8
ICU-21289 Switch to using CharString for calling uloc_getParent().
2023-09-26 23:41:24 +02:00
Fredrik Roubert
2de88f9d9c
ICU-21833 Replace UChar with char16_t in all C++ code.
2023-02-06 19:27:44 +01:00
Fredrik Roubert
2e0d30cfcf
ICU-21833 Replace NULL with nullptr in all C++ code.
2023-02-03 20:20:38 +01:00
Fredrik Roubert
030fa1a479
ICU-21148 Consistently use standard lowercase true/false everywhere.
...
This is the normal standard way in C, C++ as well as Java and there's no
longer any reason for ICU to be different. The various internal macros
providing custom boolean constants can all be deleted and code as well
as documentation can be updated to use lowercase true/false everywhere.
2022-09-07 20:56:33 +02:00
Andy Heninger
904cf62457
ICU-21763 UVector cleanup in Formatting Code
...
Revise uses of UVector in Formatting related code to better handle memory
allocation failures. This is one of an ongoing series of commits to address
similar problems with UVector usage throughout ICU.
The changes primarily involve switching uses of UVector::addElementX() to the
new adoptElement() or addElement() functions, as appropriate, and using
LocalPointers for tracking memory ownership.
2021-12-16 11:56:30 -08:00
Peter Varga
1986dcd0d8
ICU-21734 Add missing overrides
2021-09-07 17:42:14 -07:00
Andy Heninger
c26aebe802
ICU-21662 Rename UVector::addElement().
...
This is the first step towards improving the error handling and out-of-memory
behavior of UVector::addElement(). A followup PR will add back a new addElement()
with corrected error handling, then additional followups will switch call sites
from the original (renamed) function to the new addElement().
This commit includes no logic or behavior changes; it only renames the existing functions.
2021-07-28 15:36:50 -07:00
Markus Scherer
d3315d98ef
ICU-20783 use C++ covariant return types
2019-08-23 11:45:36 -07:00
Markus Scherer
f02b496494
ICU-20783 C++ covariant return types: clone(), freeze() & friends
2019-08-22 16:24:41 -07:00
Shane Carr
c81d1e94a0
ICU-13591 Refactoring ICU4C MeasureFormat to call NumberFormatter directly.
...
- Removes redundant data loading in MeasureFormat
2019-02-20 19:15:03 -06:00
Andy Heninger
242e02c388
ICU-12764 icu4c utf-8 source files, update Copyright notices.
...
X-SVN-Rev: 39583
2017-01-20 00:20:31 +00:00
kazède king
b9250c1a6e
ICU-12605 convert data enumeration to resource sink for TimeUnitFormat, C++
...
X-SVN-Rev: 38878
2016-06-24 00:51:49 +00:00
Michael Ow
61607c2773
ICU-12564 Update copyright notice in trunk
...
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Yoshito Umaoka
00ca13e126
ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
...
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f
ICU-12564 Update copyright notice in ICU4C
...
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
Andy Heninger
4f959e2bc7
ICU-11710 remove review note comment.
...
X-SVN-Rev: 38133
2015-12-15 21:23:37 +00:00
Andy Heninger
bb50b15953
ICU-11710 TimeUnitFormat, fix compile error in previous commit.
...
X-SVN-Rev: 38127
2015-12-14 05:10:38 +00:00
Andy Heninger
22dfe1dd38
ICU-11710 Use LocalPointer in TimeUnitFormat impl.
...
X-SVN-Rev: 38126
2015-12-14 04:41:52 +00:00
Steven R. Loomis
7e6c572256
ICU-10774 fix a knownissue: Collator::getAvailableLocales calculation.
...
Also, replace uhash_nextElement's parameter "-1" with UHASH_FIRST for clarity.
Also, improve service registration debugging code
X-SVN-Rev: 36836
2014-12-09 23:54:56 +00:00
John Emmons
4d47dd3226
ICU-11092 Split out units data into a separate tree
...
X-SVN-Rev: 36458
2014-09-11 10:16:22 +00:00
Michael Ow
c70512bdfe
ICU-10786 Ensure ICU 53 passes without data
...
X-SVN-Rev: 35462
2014-03-13 21:28:24 +00:00
Travis Keep
55daa14907
ICU-10640 Changes from Markus' review.
...
X-SVN-Rev: 35404
2014-03-11 17:40:23 +00:00
Travis Keep
53ababf5a7
ICU-10461 Make NumberFormat::createInstance() and PluralRules::forLocale() 10X faster than before for most common types. Provide internal createSharedInstance() for NumberFormat and SharedFormat for internal use that is 2 orders of magnitude faster than before.
...
X-SVN-Rev: 35114
2014-02-10 19:13:50 +00:00
Travis Keep
0a42d4959f
ICU-10640 Add C++ MeasureFormat API.
...
X-SVN-Rev: 35069
2014-02-04 00:29:17 +00:00
Travis Keep
12e211c5a3
ICU-10219 Fix rounding in TimeUnitFormat.
...
X-SVN-Rev: 34550
2013-10-10 21:52:15 +00:00
Travis Keep
7f3d307ef8
ICU-10274 Rollback TimePeriod additions, but leave in changes to listformatter for Mark's more generic units API.
...
X-SVN-Rev: 34135
2013-08-29 23:45:48 +00:00
Michael Ow
27d3e9435b
ICU-10274 Close resource bundle after use
...
X-SVN-Rev: 34042
2013-08-14 20:17:38 +00:00
Travis Keep
ecd7ea193b
ICU-10274 Add compound duration formatting for C++
...
X-SVN-Rev: 33986
2013-07-25 16:36:25 +00:00
Travis Keep
3cb132047d
ICU-10222 TimeUnitFormat to look under units/duration for time units instead of just units.
...
X-SVN-Rev: 33917
2013-07-11 22:19:13 +00:00
Jungshik Shin
4934b397a8
ICU-8343 fix build errors in Visual Studio when exception is disabled
...
X-SVN-Rev: 32010
2012-06-28 23:28:00 +00:00
Michael Ow
6f32f4f5a4
ICU-9232 Use forward declaration for non-public class
...
X-SVN-Rev: 31986
2012-06-25 16:34:19 +00:00
Andy Heninger
c1dc277c46
ICU-9042 Memory leak in Time Unit Format.
...
X-SVN-Rev: 31943
2012-06-12 18:23:49 +00:00
Xiaomei Ji
a9ea9b2a82
ICU-9042 in time unit format, ignore those plural counts that are not defined in the locale's plural rules
...
X-SVN-Rev: 31924
2012-06-08 19:02:03 +00:00
Yoshito Umaoka
e9503bdade
ICU-8909 Fixed various warnings reported by a source code analysis tool.
...
X-SVN-Rev: 30958
2011-11-14 19:32:51 +00:00
Markus Scherer
2201fb816c
ICU-7877 optionally explicit UnicodeString constructors, and make them explicit inside ICU
...
X-SVN-Rev: 30293
2011-07-07 18:46:19 +00:00
Markus Scherer
9f7d74001c
ICU-8605 document & test ICU4C dependencies, remove cycles, reduce some deps; merged from branches/markus/depstest -r 30155:30193
...
X-SVN-Rev: 30194
2011-06-03 05:23:57 +00:00
Markus Scherer
a84df9c29c
ICU-7387 fix dates & versions
...
X-SVN-Rev: 29918
2011-04-28 17:31:44 +00:00
Claire Ho
83d13b22aa
ICU-7387 Changed TimeUnitFormat::EStyle should bto C enum.
...
X-SVN-Rev: 29916
2011-04-28 16:42:58 +00:00
Dragan Besevic
21685ff673
ICU-8364 Check the return code when creating hashtable and return null in the case of failure
...
X-SVN-Rev: 29502
2011-03-01 20:55:43 +00:00
Umesh Nair
aae8e8df81
ICU-7023 Fix import for EBCDIC machines.
...
X-SVN-Rev: 29009
2010-11-05 23:43:11 +00:00
Umesh Nair
c9ae826bca
ICU-7023 Supporting import in collation rules
...
X-SVN-Rev: 28967
2010-11-01 22:23:49 +00:00
Jie J. Yang
396f2a8f3a
ICU-7902 TimeUnitFormat uses unlocalized short time units for Greek, icu4c part
...
X-SVN-Rev: 28872
2010-10-19 08:28:02 +00:00
Andy Heninger
633cd9763a
ICU-7789 ICU4C memory allocation function cleanup. 4.5.2 BRS task.
...
X-SVN-Rev: 28714
2010-09-27 23:52:31 +00:00
Andy Heninger
74e297291f
ICU-7780 fix various compiler warnings
...
X-SVN-Rev: 28301
2010-07-12 18:03:29 +00:00
Markus Scherer
f6a04770ff
ICU-7455 use compiler RTTI; stop adding poor mans RTTI to new class hierarchies
...
X-SVN-Rev: 28075
2010-05-19 17:29:33 +00:00
Markus Scherer
81234fecdb
ICU-7273 add loading of custom data, with caching, test data and test code
...
X-SVN-Rev: 27578
2010-02-16 23:43:22 +00:00
Peter Edberg
ccfd885876
ICU-7322 Get rid of friend declaration for internal plain-C comparotor functions
...
X-SVN-Rev: 27304
2010-01-16 19:59:59 +00:00