diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-11 11:57:57 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-05-12 18:07:36 +0300 |
commit | bd7fb64baec7879931d15090ac4d0c10d853702e (patch) | |
tree | b798b03bf840f046399d6f78700545e2a84b73c3 /platform/glfw | |
parent | 12dba86facb31c2c3911879aa547974caa3761dc (diff) | |
download | qtlocation-mapboxgl-bd7fb64baec7879931d15090ac4d0c10d853702e.tar.gz |
[tidy] modernize-use-nullptr
Diffstat (limited to 'platform/glfw')
-rw-r--r-- | platform/glfw/main.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp index 83cafe50b9..e95a15a55b 100644 --- a/platform/glfw/main.cpp +++ b/platform/glfw/main.cpp @@ -39,15 +39,15 @@ int main(int argc, char *argv[]) { bool skipConfig = false; const struct option long_options[] = { - {"fullscreen", no_argument, 0, 'f'}, - {"benchmark", no_argument, 0, 'b'}, - {"style", required_argument, 0, 's'}, - {"lon", required_argument, 0, 'x'}, - {"lat", required_argument, 0, 'y'}, - {"zoom", required_argument, 0, 'z'}, - {"bearing", required_argument, 0, 'r'}, - {"pitch", required_argument, 0, 'p'}, - {0, 0, 0, 0} + {"fullscreen", no_argument, nullptr, 'f'}, + {"benchmark", no_argument, nullptr, 'b'}, + {"style", required_argument, nullptr, 's'}, + {"lon", required_argument, nullptr, 'x'}, + {"lat", required_argument, nullptr, 'y'}, + {"zoom", required_argument, nullptr, 'z'}, + {"bearing", required_argument, nullptr, 'r'}, + {"pitch", required_argument, nullptr, 'p'}, + {nullptr, 0, nullptr, 0} }; while (true) { @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) { switch (opt) { case 0: - if (long_options[option_index].flag != 0) + if (long_options[option_index].flag != nullptr) break; case 'f': fullscreen = true; @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) { sigIntHandler.sa_handler = quit_handler; sigemptyset(&sigIntHandler.sa_mask); sigIntHandler.sa_flags = 0; - sigaction(SIGINT, &sigIntHandler, NULL); + sigaction(SIGINT, &sigIntHandler, nullptr); if (benchmark) { mbgl::Log::Info(mbgl::Event::General, "BENCHMARK MODE: Some optimizations are disabled."); |