Commit graph

13 commits

Author SHA1 Message Date
Fredrik Roubert
929cd9bb4f ICU-22520 Standardize return on error for all locale functions.
· No function should do anything if an error has already occurred.
· On error, a value of 0, nullptr, {}, etc., should be returned.
· Values shouldn't have overloaded meanings (eg. index or found).
· Values that are never used should not be returned at all.
2024-02-29 20:42:03 +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
a6efa924ad ICU-22520 Let ulocimp_getRegionForSupplementalData() return CharString. 2024-02-07 14:27:40 +01:00
Shane F. Carr
fc386c3a9a ICU-22149 Be more graceful with missing lang bundle data
See #2635
2023-10-03 14:20:26 -07: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
Frank Tang
43f2ae75ca ICU-22004 Avoid UBSan bug by casting only when success 2022-06-24 18:00:03 -07:00
Frank Tang
f1a8a63f06 ICU-21316 Fix bug under different default locales
See #1399
2020-10-07 21:05:29 -07:00
Daniel Ju
b13c951348
ICU-20043 ICU-13214 ICU-13764 MSVC W3 and W4 warning cleanup (#53)
Cleaned up all of the MSVC W3 warnings and most of the W4 warnings in the common and i18n projects.
2018-09-27 14:27:38 -07:00
Andy Heninger
04448b004f ICU-12764 UTF-8 source files, update file encoding comments.
X-SVN-Rev: 39641
2017-02-03 18:57:23 +00: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
Andy Heninger
0fd5600285 ICU-12809 only .cpp files no .c in ICU library code
X-SVN-Rev: 39527
2016-12-07 21:14:27 +00:00
Renamed from icu4c/source/i18n/ulocdata.c (Browse further)