diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-03-07 20:37:43 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-03-07 20:37:43 +0000 |
commit | 8d5df9b9d49532d73870bb52716d89d05a122fe0 (patch) | |
tree | 4d2dd6ed7f76b10ffef876d2d2eef40f0d61961d /libcxx | |
parent | 3933f6f6ca8319613ffb014257847c312eacf419 (diff) | |
download | bcm5719-llvm-8d5df9b9d49532d73870bb52716d89d05a122fe0.tar.gz bcm5719-llvm-8d5df9b9d49532d73870bb52716d89d05a122fe0.zip |
Change some smart_ptr == 0 to smart_ptr == nullptr. Fixes http://llvm.org/bugs/show_bug.cgi?id=12185.
llvm-svn: 152240
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/include/locale | 2 | ||||
-rw-r--r-- | libcxx/src/locale.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libcxx/include/locale b/libcxx/include/locale index 2bdae30bfcc..f6d3860798c 100644 --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -3561,7 +3561,7 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl, __throw_bad_alloc(); __hn.reset(__bb); __hd.reset((char_type*)malloc(__n * sizeof(char_type))); - if (__hd == 0) + if (__hd == nullptr) __throw_bad_alloc(); __db = __hd.get(); } diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 109629d646f..5c4215aae1c 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -4084,7 +4084,7 @@ numpunct_byname<char>::__init(const char* nm) { __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); #ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == 0) + if (loc == nullptr) throw runtime_error("numpunct_byname<char>::numpunct_byname" " failed to construct for " + string(nm)); #endif // _LIBCPP_NO_EXCEPTIONS @@ -4127,7 +4127,7 @@ numpunct_byname<wchar_t>::__init(const char* nm) { __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); #ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == 0) + if (loc == nullptr) throw runtime_error("numpunct_byname<char>::numpunct_byname" " failed to construct for " + string(nm)); #endif // _LIBCPP_NO_EXCEPTIONS @@ -5518,7 +5518,7 @@ moneypunct_byname<char, false>::init(const char* nm) typedef moneypunct<char, false> base; __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); #ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == 0) + if (loc == nullptr) throw runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); #endif // _LIBCPP_NO_EXCEPTIONS @@ -5560,7 +5560,7 @@ moneypunct_byname<char, true>::init(const char* nm) typedef moneypunct<char, true> base; __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); #ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == 0) + if (loc == nullptr) throw runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); #endif // _LIBCPP_NO_EXCEPTIONS @@ -5615,7 +5615,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm) typedef moneypunct<wchar_t, false> base; __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); #ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == 0) + if (loc == nullptr) throw runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); #endif // _LIBCPP_NO_EXCEPTIONS @@ -5692,7 +5692,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm) typedef moneypunct<wchar_t, true> base; __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); #ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == 0) + if (loc == nullptr) throw runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); #endif // _LIBCPP_NO_EXCEPTIONS |