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:
@@ -40,7 +40,7 @@ _KLT_FloatImage _KLTCreateFloatImage(
|
||||
ncols * nrows * sizeof(float);
|
||||
|
||||
floatimg = (_KLT_FloatImage) malloc(nbytes);
|
||||
if (floatimg == NULL) {
|
||||
if (floatimg == nullptr) {
|
||||
KLTError("(_KLTCreateFloatImage) Out of memory");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user