diff options
author | David Chisnall <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
---|---|---|
committer | David Chisnall <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
commit | 94e3ee44c3581ff37c5e01b5ffe5eb16d30079a7 (patch) | |
tree | 077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/src/memory.cpp | |
parent | 064f517d2b6ebfc42bf636d3fb85ac815196f134 (diff) | |
parent | 362d815b81e2b4b66c33b99203d821b8928607e1 (diff) |
Notes
Diffstat (limited to 'contrib/libc++/src/memory.cpp')
-rw-r--r-- | contrib/libc++/src/memory.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/contrib/libc++/src/memory.cpp b/contrib/libc++/src/memory.cpp index cb5e5e7b06ad..a892e75c86d0 100644 --- a/contrib/libc++/src/memory.cpp +++ b/contrib/libc++/src/memory.cpp @@ -100,10 +100,7 @@ __shared_weak_count::lock() _NOEXCEPT if (__sync_bool_compare_and_swap(&__shared_owners_, object_owners, object_owners+1)) - { - __add_weak(); return this; - } object_owners = __shared_owners_; } return 0; @@ -154,7 +151,7 @@ align(size_t alignment, size_t size, void*& ptr, size_t& space) { char* p1 = static_cast<char*>(ptr); char* p2 = (char*)((size_t)(p1 + (alignment - 1)) & -alignment); - ptrdiff_t d = p2 - p1; + size_t d = static_cast<size_t>(p2 - p1); if (d <= space - size) { r = p2; |