Use nullptr instead of NULL
This commit is contained in:
parent
fab8f67b82
commit
d7aec10317
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue