[libcxx-commits] [libcxx] d42baff - Replace old-style cast of null pointer with nullptr

Joerg Sonnenberger via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 22 17:20:38 PST 2020


Author: Joerg Sonnenberger
Date: 2020-01-23T02:20:09+01:00
New Revision: d42baff45d9700a199982ba0ac04dbc6c6d911bb

URL: https://github.com/llvm/llvm-project/commit/d42baff45d9700a199982ba0ac04dbc6c6d911bb
DIFF: https://github.com/llvm/llvm-project/commit/d42baff45d9700a199982ba0ac04dbc6c6d911bb.diff

LOG: Replace old-style cast of null pointer with nullptr

Added: 
    

Modified: 
    libcxx/src/locale.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 2757eaa5acda..b9180880e494 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -536,7 +536,7 @@ locale::operator=(const locale& other)  _NOEXCEPT
 
 locale::locale(const char* name)
     : __locale_(name ? new __imp(name)
-                     : (__throw_runtime_error("locale constructed with null"), (__imp*)0))
+                     : (__throw_runtime_error("locale constructed with null"), nullptr))
 {
     __locale_->__add_shared();
 }
@@ -549,7 +549,7 @@ locale::locale(const string& name)
 
 locale::locale(const locale& other, const char* name, category c)
     : __locale_(name ? new __imp(*other.__locale_, name, c)
-                     : (__throw_runtime_error("locale constructed with null"), (__imp*)0))
+                     : (__throw_runtime_error("locale constructed with null"), nullptr))
 {
     __locale_->__add_shared();
 }


        


More information about the libcxx-commits mailing list