VoxelBlur
Depth-of-field volume rendering
 All Classes Files Functions Variables Enumerations Enumerator
stdafx.h
Go to the documentation of this file.
1 #include <QtWidgets>
2 #include <memory>
3 
9 using std::unique_ptr;
10 
11 //nullable-delete functions (https://stackoverflow.com/questions/1265666/reason-why-not-to-have-a-delete-macro-for-c)
12 template< class T > void SafeDelete( T*& pVal )
13 {
14  if(pVal)
15  {
16  delete pVal;
17  pVal = nullptr;
18  }
19 }
20 
21 template< class T > void SafeDeleteArray( T*& pVal )
22 {
23  if(pVal)
24  {
25  delete[] pVal;
26  pVal = nullptr;
27  }
28 }