Commit graph

33 commits

Author SHA1 Message Date
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
ce052f52c2 ICU-22621 Clang-Tidy: readability-delete-null-pointer
https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/readability/delete-null-pointer.html
2024-03-18 17:14:23 +01:00
Markus Scherer
b6dcc95d3c ICU-21833 remove redundant void parameter lists
See #2351
2023-03-02 09:31:57 -08:00
Frank Tang
638acd0c38 ICU-21374 Add a CFI build bot for ICU4C
Add the github action bot to build with cfi
Also fix all the known issues which require the change from C style cast to
static_cast inside the i18n and common directory while we are sure about
the object. and use
C++ style dynamic_cast for base-to-derive cast in other code inside i18n
and common and in test code or tool.
Change to use const_cast for casting between const / non-const
2023-02-06 15:47:14 -08: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
fc64f8db3f ICU-22041 Fix "Africa/Casablanca" show strange LONG displayName
See #2096
2022-05-26 14:59:10 -07:00
Andy Heninger
35dff23fb5 ICU-21662 UVector cleanup in rbtz.cpp
Revise uses of UVector in rbtz.cpp 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 include

- Use LocalPointers and UVector deleter functions to simplify OOM checking and recovery.
- Fix RuleBasedTimeZone::addTransitionRule(rule) to have standard ICU adopt behavior
  when errors occur, meaning automatic deletion of the incoming rule. This simplifies
  both the implementation of the function and the code at the call sites.
- Update addTransitionRule() call sites. Includes modifying the Dangi calendar initializtion
  to not silently ignore errors.
- struct Transition is changed to derive from UMemory, which allows the use of LocalPointers.
2021-09-21 16:29:51 -07:00
Fredrik Roubert
0a1cfa398c ICU-20973 Use standard keywords true & false to initialize type bool.
Now when all equality operators return standard bool (commit 633438f),
it no longer makes any sense to use the ICU4C constants TRUE & FALSE
or local variables of type UBool for their return value.
2021-08-26 18:53:10 +02:00
Fredrik Roubert
633438f8da ICU-20973 Change all equality operator return types from UBool to bool. 2021-08-17 00:35:00 +02: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
yumaoka
53aa0505c5 ICU-21372 getOffsetFromLocal for C and C++
See #1610
2021-03-02 10:21:28 -08:00
Markus Scherer
f02b496494 ICU-20783 C++ covariant return types: clone(), freeze() & friends 2019-08-22 16:24:41 -07:00
Andy Heninger
afa9b9b48e ICU-20588 UMutex, add cleanup of underlying mutexes, and simplify usage model 2019-05-24 13:24:59 -07:00
Andy Heninger
b772241b52 ICU-20520 UMutex refactoring.
- Use STATIC_NEW for mutex creation, to avoid order-of-destruction problems
    by avoiding destruction altogether, while avoiding memory leak reports.

  - Remove UConditionVar, replace with direct use of std::condition_variable
2019-05-07 13:50:49 -07:00
Andy Heninger
bc4bb89af2 ICU-20488 mutex static constructor fixes.
Remove the dependencies from the ICU library code on static constructors
that were introduced by using std::mutex and condition variables. The
mutexes are lazily initialized by embedding them as local static variables
in getter functions, and relying on the C++ compiler/runtime to do thread
safe initialization of them.
2019-03-12 09:52:16 -07: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
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
978f71fe78 ICU-10051 Mutexes: introduce UInitOnce; remove UMTX_CHECK; replace all uses of UMTX_CHECK.
X-SVN-Rev: 33787
2013-05-31 23:50:15 +00:00
Yoshito Umaoka
b676128bfe ICU-9648 Changed BasicTimeZone public API methods to const.
X-SVN-Rev: 33109
2013-02-01 07:39:04 +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
Yoshito Umaoka
4334ee838f ICU-8943 RBTZ fix in ICU4C and its test case
X-SVN-Rev: 31009
2011-12-02 07:02:54 +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
George Rhoten
928d6152bc ICU-6176 Fix some Coverity warnings
X-SVN-Rev: 23414
2008-02-13 09:35:50 +00:00
Yoshito Umaoka
7e51ed7330 ICU-5990 Merging time zone formatting/parsing changes from yoshito's working branch to the trunk.
X-SVN-Rev: 22978
2007-11-28 20:49:58 +00:00
Yoshito Umaoka
0de5cefde3 ICU-5454 Ported additional time zone test cases from ICU4J. Also fixed some bugs found by the new test cases.
X-SVN-Rev: 22311
2007-08-08 00:57:05 +00:00
George Rhoten
57f9ad80e7 ICU-5454 Fix some new memory leaks.
X-SVN-Rev: 21981
2007-07-14 03:58:14 +00:00
Yoshito Umaoka
e0e1ccd5a4 ICU-5454 Fix some compiler warnings
X-SVN-Rev: 21912
2007-07-05 17:17:59 +00:00
Yoshito Umaoka
5c3732d32b ICU-5454 Update argument of operator== in RuleBasedTimeZone, InitialTimeZoneRule, AnnualTimeZoneRule and TimeArrayTimeZoneRule to match their super class.
X-SVN-Rev: 21886
2007-07-02 14:56:08 +00:00
George Rhoten
78c96b07fa ICU-5454 Fix newline settings for new code.
X-SVN-Rev: 21851
2007-06-29 16:27:12 +00:00
Yoshito Umaoka
b340ff12f6 ICU-5454 Merging ICU4C RuleBasedTimeZone/TimeZoneRule/VTimeZone implementation into trunk
X-SVN-Rev: 21845
2007-06-29 03:10:43 +00:00