diff options
| author | Alp Toker <alp@nuanti.com> | 2014-01-17 16:17:24 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2014-01-17 16:17:24 +0000 |
| commit | 5fea974b6ba4992b328d72499d242aaeadd7351e (patch) | |
| tree | 635c45455e09ec9398772e4aff7f2de662effaf9 /libcxx/src/stdexcept.cpp | |
| parent | 115c3f7a3629d34dabb7207d837098b60e446150 (diff) | |
Adjust build fix from r199494 to use C++ casts
Change suggested by Joerg Sonnenberger!
llvm-svn: 199500
Diffstat (limited to 'libcxx/src/stdexcept.cpp')
| -rw-r--r-- | libcxx/src/stdexcept.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp index 497931c91fbc..ec7f666dc6d9 100644 --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -79,7 +79,7 @@ __libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT const char* p = str_; str_ = s.str_; __sync_add_and_fetch(&count(), 1); - if (__sync_add_and_fetch((count_t*)(p-sizeof(count_t)), count_t(-1)) < 0) + if (__sync_add_and_fetch(reinterpret_cast<count_t*>(const_cast<char*>(p)-sizeof(count_t)), count_t(-1)) < 0) delete [] (p-offset); return *this; } |
