diff --git a/src/main.cpp b/src/main.cpp index c30c786..4c7cb84 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { char *res_loc; switch (argc - optind) { case 0: { - res_loc = NULL; + res_loc = nullptr; for (const auto& fe : std::filesystem::directory_iterator(".")) { if (!fe.is_regular_file()) continue; @@ -72,9 +72,9 @@ int main(int argc, char *argv[]) { if (fp.extension() != ".shp") continue; - if (res_loc != NULL) { + if (res_loc != nullptr) { free(res_loc); - res_loc = NULL; + res_loc = nullptr; break; } @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) { fps.copy(res_loc, fps.size()); res_loc[fps.size()] = '\0'; } - if (res_loc == NULL) { + if (res_loc == nullptr) { std::cerr << "Failed to automatically find residents shapefile!" << std::endl; return 1; }