diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-27 02:42:01 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-27 02:42:01 +0800 |
| commit | c84e212d0de5ff9f14ab14ac5143e56d2839ac82 (patch) | |
| tree | f511bc44b251d5dac2a7ab87b687e8d00b3dc07c /main.cc | |
| parent | ba1e3fdd1eea618a38e56918912dc966d1e399a8 (diff) | |
fix the rr-conflicts
Diffstat (limited to 'main.cc')
| -rw-r--r-- | main.cc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,11 +14,11 @@ int main(int argc, char* argv[]) { int rv; - pcc::LogLevel level = pcc::PCC_WARNING; + int level = pcc::ToUnderlying(pcc::PCC_WARNING); while ((rv = getopt(argc, argv, "vVh")) != -1) { switch (rv) { case 'v': - level = pcc::PCC_DEBUG; + level = (level == 0 ? 0 : level - 1); break; case 'V': pcc::ShowVersion(); @@ -29,6 +29,7 @@ int main(int argc, char* argv[]) { pcc::ShowHelp(); } } + pcc::SetLogLevel(static_cast<pcc::LogLevel>(level)); if (optind >= argc) { pcc::Log(pcc::PCC_ERROR, "No input file specified"); return 0; |
