diff options
author | romankoshelev <romankoshelev@yandex-team.com> | 2023-08-14 19:51:50 +0300 |
---|---|---|
committer | romankoshelev <romankoshelev@yandex-team.com> | 2023-08-15 01:24:11 +0300 |
commit | cfcd865e05c0d0525ea27d1e153a043b32a85138 (patch) | |
tree | 68d3b3b25271e8a4998505897a269ff7ce119b76 /contrib/libs/icu/common/sharedobject.h | |
parent | ccb790c507bd5e8ffe2ef9886ce5ee0a7ce22a15 (diff) | |
download | ydb-cfcd865e05c0d0525ea27d1e153a043b32a85138.tar.gz |
Update ICU to 73.2
Diffstat (limited to 'contrib/libs/icu/common/sharedobject.h')
-rw-r--r-- | contrib/libs/icu/common/sharedobject.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/libs/icu/common/sharedobject.h b/contrib/libs/icu/common/sharedobject.h index 6ccfb27b01..5532ec48d8 100644 --- a/contrib/libs/icu/common/sharedobject.h +++ b/contrib/libs/icu/common/sharedobject.h @@ -38,8 +38,8 @@ public: virtual ~UnifiedCacheBase(); private: - UnifiedCacheBase(const UnifiedCacheBase &); - UnifiedCacheBase &operator=(const UnifiedCacheBase &); + UnifiedCacheBase(const UnifiedCacheBase &) = delete; + UnifiedCacheBase &operator=(const UnifiedCacheBase &) = delete; }; /** @@ -57,14 +57,14 @@ public: SharedObject() : softRefCount(0), hardRefCount(0), - cachePtr(NULL) {} + cachePtr(nullptr) {} /** Initializes totalRefCount, softRefCount to 0. */ SharedObject(const SharedObject &other) : UObject(other), softRefCount(0), hardRefCount(0), - cachePtr(NULL) {} + cachePtr(nullptr) {} virtual ~SharedObject(); @@ -116,7 +116,7 @@ public: * If there are multiple owners, then ptr is replaced with a * copy-constructed clone, * and that is returned. - * Returns NULL if cloning failed. + * Returns nullptr if cloning failed. * * T must be a subclass of SharedObject. */ @@ -125,7 +125,7 @@ public: const T *p = ptr; if(p->getRefCount() <= 1) { return const_cast<T *>(p); } T *p2 = new T(*p); - if(p2 == NULL) { return NULL; } + if(p2 == nullptr) { return nullptr; } p->removeRef(); ptr = p2; p2->addRef(); @@ -135,7 +135,7 @@ public: /** * Makes dest an owner of the object pointed to by src while adjusting * reference counts and deleting the previous object dest pointed to - * if necessary. Before this call is made, dest must either be NULL or + * if necessary. Before this call is made, dest must either be nullptr or * be included in the reference count of the object it points to. * * T must be a subclass of SharedObject. @@ -143,20 +143,20 @@ public: template<typename T> static void copyPtr(const T *src, const T *&dest) { if(src != dest) { - if(dest != NULL) { dest->removeRef(); } + if(dest != nullptr) { dest->removeRef(); } dest = src; - if(src != NULL) { src->addRef(); } + if(src != nullptr) { src->addRef(); } } } /** - * Equivalent to copyPtr(NULL, dest). + * Equivalent to copyPtr(nullptr, dest). */ template<typename T> static void clearPtr(const T *&ptr) { - if (ptr != NULL) { + if (ptr != nullptr) { ptr->removeRef(); - ptr = NULL; + ptr = nullptr; } } |