Searched defs:reinterpret_cast (Results 1 - 3 of 3) sorted by relevance

/external/chromium_org/third_party/skia/include/core/
H A DSkTemplates.h54 return reinterpret_cast<D*>(ptr + count);
62 // This relies on the fact that reinterpret_cast can add constness, but cannot remove it.
63 return reinterpret_cast<D*>(
64 reinterpret_cast<typename SkTConstType<char, SkTIsConst<D>::value>::type*>(ptr) + byteOffset
355 fPtr = reinterpret_cast<T*>(sk_realloc_throw(fPtr, count * sizeof(T)));
323 SkASSERT(index < fCount); return fArray[index]; } private: int fCount; T* fArray; char fStorage[N * sizeof(T)]; }; template <typename T> class SkAutoTMalloc : SkNoncopyable { public: explicit SkAutoTMalloc(T* ptr = NULL) { fPtr = ptr; } explicit SkAutoTMalloc(size_t count) { fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW); } ~SkAutoTMalloc() { sk_free(fPtr); } void realloc(size_t count) { fPtr = reinterpret_cast<T*>(sk_realloc_throw(fPtr, count * sizeof(T))); } void reset(size_t count) { sk_free(fPtr); fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW); } T* get() const { return fPtr; } operator T*() { return fPtr; } operator const T*() const { return fPtr; } T& operator[](int index) { return fPtr[index]; } const T& operator[](int index) const { return fPtr[index]; } T* detach() { T* ptr = fPtr; fPtr = NULL; return ptr; } private: T* fPtr; }; template <size_t N, typename T> class SkAutoSTMalloc : SkNoncopyable { public: SkAutoSTMalloc() { fPtr = NULL; } SkAutoSTMalloc(size_t count) { if (count > N) argument
/external/skia/include/core/
H A DSkTemplates.h54 return reinterpret_cast<D*>(ptr + count);
62 // This relies on the fact that reinterpret_cast can add constness, but cannot remove it.
63 return reinterpret_cast<D*>(
64 reinterpret_cast<typename SkTConstType<char, SkTIsConst<D>::value>::type*>(ptr) + byteOffset
342 fPtr = reinterpret_cast<T*>(sk_realloc_throw(fPtr, count * sizeof(T)));
310 SkASSERT(index < fCount); return fArray[index]; } private: int fCount; T* fArray; char fStorage[N * sizeof(T)]; }; template <typename T> class SkAutoTMalloc : SkNoncopyable { public: explicit SkAutoTMalloc(T* ptr = NULL) { fPtr = ptr; } explicit SkAutoTMalloc(size_t count) { fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP); } ~SkAutoTMalloc() { sk_free(fPtr); } void realloc(size_t count) { fPtr = reinterpret_cast<T*>(sk_realloc_throw(fPtr, count * sizeof(T))); } void reset(size_t count) { sk_free(fPtr); fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP); } T* get() const { return fPtr; } operator T*() { return fPtr; } operator const T*() const { return fPtr; } T& operator[](int index) { return fPtr[index]; } const T& operator[](int index) const { return fPtr[index]; } T* detach() { T* ptr = fPtr; fPtr = NULL; return ptr; } private: T* fPtr; }; template <size_t N, typename T> class SkAutoSTMalloc : SkNoncopyable { public: SkAutoSTMalloc() { fPtr = NULL; } SkAutoSTMalloc(size_t count) { if (count > N) argument
/external/clang/test/Preprocessor/
H A Dcxx_oper_keyword_ms_compat.cpp74 #define reinterpret_cast macro
159 reinterpret_cast

Completed in 4439 milliseconds