1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Whitespace

This commit is contained in:
ed 2021-07-22 14:57:45 +01:00
parent 4fd0401752
commit cf79cc4724

View file

@ -183,18 +183,18 @@ inline const Type* addBytesToPointer (const Type* basePointer, IntegerType bytes
#define juce_UseDebuggingNewOperator
#endif
/** Converts an owning raw pointer into a unique_ptr, deriving the
type of the unique_ptr automatically.
/** Converts an owning raw pointer into a unique_ptr, deriving the
type of the unique_ptr automatically.
This should only be used with pointers to single objects.
Do NOT pass a pointer to an array to this function, as the
destructor of the unique_ptr will incorrectly call `delete`
instead of `delete[]` on the pointer.
*/
template <typename T>
std::unique_ptr<T> rawToUniquePtr (T* ptr)
{
return std::unique_ptr<T> (ptr);
}
This should only be used with pointers to single objects.
Do NOT pass a pointer to an array to this function, as the
destructor of the unique_ptr will incorrectly call `delete`
instead of `delete[]` on the pointer.
*/
template <typename T>
std::unique_ptr<T> rawToUniquePtr (T* ptr)
{
return std::unique_ptr<T> (ptr);
}
} // namespace juce