Apply modernize-use-nullptr
Setup: - `mkdir tidy; cd tidy` - `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` - `cd ..` - `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
* @param size Number of elements of size T to allocate, i.e. allocated size will be sizeof(T)*size ; set it to 0 if you want to defer the allocation
|
||||
* @param align Expressed in bytes; SSE instructions need 128 bits alignment, which mean 16 bytes, which is the default value
|
||||
*/
|
||||
AlignedBuffer (size_t size = 0, size_t align = 16) : real(NULL), alignment(align), allocatedSize(0), unitSize(0), data(NULL), inUse(false)
|
||||
AlignedBuffer (size_t size = 0, size_t align = 16) : real(nullptr), alignment(align), allocatedSize(0), unitSize(0), data(nullptr), inUse(false)
|
||||
{
|
||||
if (size) {
|
||||
resize(size);
|
||||
@@ -78,8 +78,8 @@ public:
|
||||
free(real);
|
||||
}
|
||||
|
||||
real = NULL;
|
||||
data = NULL;
|
||||
real = nullptr;
|
||||
data = nullptr;
|
||||
inUse = false;
|
||||
allocatedSize = 0;
|
||||
unitSize = 0;
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
} else {
|
||||
allocatedSize = 0;
|
||||
unitSize = 0;
|
||||
data = NULL;
|
||||
data = nullptr;
|
||||
inUse = false;
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user