diff options
| author | David Chisnall <theraven@FreeBSD.org> | 2012-03-13 14:09:15 +0000 |
|---|---|---|
| committer | David Chisnall <theraven@FreeBSD.org> | 2012-03-13 14:09:15 +0000 |
| commit | 362d815b81e2b4b66c33b99203d821b8928607e1 (patch) | |
| tree | 491848d33dbdf1751fd52f321d3fbf70a8e616f2 /src/memory.cpp | |
| parent | 1828c5696f7bf5850943ea6c660a493a5e648669 (diff) | |
Notes
Diffstat (limited to 'src/memory.cpp')
| -rw-r--r-- | src/memory.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/memory.cpp b/src/memory.cpp index cb5e5e7b06ad8..a892e75c86d07 100644 --- a/src/memory.cpp +++ b/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; |
