summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/rbbistbl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/rbbistbl.cpp')
-rw-r--r--thirdparty/icu4c/common/rbbistbl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/thirdparty/icu4c/common/rbbistbl.cpp b/thirdparty/icu4c/common/rbbistbl.cpp
index bfaacf6425..27f31a9d55 100644
--- a/thirdparty/icu4c/common/rbbistbl.cpp
+++ b/thirdparty/icu4c/common/rbbistbl.cpp
@@ -41,7 +41,7 @@ U_CDECL_END
U_NAMESPACE_BEGIN
RBBISymbolTable::RBBISymbolTable(RBBIRuleScanner *rs, const UnicodeString &rules, UErrorCode &status)
- :fRules(rules), fRuleScanner(rs), ffffString(char16_t(0xffff))
+ : fRules(rules), fRuleScanner(rs), ffffString(static_cast<char16_t>(0xffff))
{
fHashTable = nullptr;
fCachedSetLookup = nullptr;
@@ -76,9 +76,9 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const
RBBINode *exprNode;
RBBINode *usetNode;
const UnicodeString *retString;
- RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const
+ RBBISymbolTable *This = const_cast<RBBISymbolTable*>(this); // cast off const
- el = (RBBISymbolTableEntry *)uhash_get(fHashTable, &s);
+ el = static_cast<RBBISymbolTableEntry*>(uhash_get(fHashTable, &s));
if (el == nullptr) {
return nullptr;
}
@@ -119,7 +119,7 @@ const UnicodeString *RBBISymbolTable::lookup(const UnicodeString& s) const
const UnicodeFunctor *RBBISymbolTable::lookupMatcher(UChar32 ch) const
{
UnicodeSet *retVal = nullptr;
- RBBISymbolTable *This = (RBBISymbolTable *)this; // cast off const
+ RBBISymbolTable *This = const_cast<RBBISymbolTable*>(this); // cast off const
if (ch == 0xffff) {
retVal = fCachedSetLookup;
This->fCachedSetLookup = nullptr;
@@ -170,7 +170,7 @@ RBBINode *RBBISymbolTable::lookupNode(const UnicodeString &key) const{
RBBINode *retNode = nullptr;
RBBISymbolTableEntry *el;
- el = (RBBISymbolTableEntry *)uhash_get(fHashTable, &key);
+ el = static_cast<RBBISymbolTableEntry*>(uhash_get(fHashTable, &key));
if (el != nullptr) {
retNode = el->val;
}
@@ -190,7 +190,7 @@ void RBBISymbolTable::addEntry (const UnicodeString &key, RBBINode *
if (U_FAILURE(err)) {
return;
}
- e = (RBBISymbolTableEntry *)uhash_get(fHashTable, &key);
+ e = static_cast<RBBISymbolTableEntry*>(uhash_get(fHashTable, &key));
if (e != nullptr) {
err = U_BRK_VARIABLE_REDFINITION;
return;