--- skia/include/private/base/SkTemplates.h +++ skia/include/private/base/SkTemplates.h @@ -122,7 +122,9 @@ } // Reallocates given a new count. Reallocation occurs even if new count equals old count. +#ifndef _MSC_VER [[clang::reinitializes]] +#endif void reset(size_t count = 0) { *this = AutoTArray(count); } @@ -210,7 +212,9 @@ } /** Destroys previous objects in the array and default constructs count number of objects */ +#ifndef _MSC_VER [[clang::reinitializes]] +#endif void reset(int count) { T* start = begin(); T* iter = end(); @@ -331,7 +335,9 @@ } /** Resize the memory area pointed to by the current ptr without preserving contents. */ +#ifndef _MSC_VER [[clang::reinitializes]] +#endif T* reset(size_t count = 0) { fPtr.reset(count ? (T*)sk_malloc_throw(count, sizeof(T)) : nullptr); return this->get(); @@ -402,7 +408,9 @@ } // doesn't preserve contents +#ifndef _MSC_VER [[clang::reinitializes]] +#endif T* reset(size_t count) { if (fPtr != fTStorage) { sk_free(fPtr);