@@ -41,7 +41,7 @@ Settings::Settings()
4141{
4242 severity.setEnabled (Severity::error, true );
4343 certainty.setEnabled (Certainty::normal, true );
44- setCheckLevelExhaustive ( );
44+ setCheckLevel (Settings::CheckLevel::exhaustive );
4545 executor = defaultExecutor ();
4646}
4747
@@ -268,21 +268,20 @@ void Settings::loadSummaries()
268268 Summaries::loadReturn (buildDir, summaryReturn);
269269}
270270
271-
272- void Settings::setCheckLevelExhaustive ()
273- {
274- // Checking can take a little while. ~ 10 times slower than normal analysis is OK.
275- checkLevel = CheckLevel::exhaustive;
276- performanceValueFlowMaxIfCount = -1 ;
277- performanceValueFlowMaxSubFunctionArgs = 256 ;
278- }
279-
280- void Settings::setCheckLevelNormal ()
271+ void Settings::setCheckLevel (CheckLevel level)
281272{
282- // Checking should finish in reasonable time.
283- checkLevel = CheckLevel::normal;
284- performanceValueFlowMaxSubFunctionArgs = 8 ;
285- performanceValueFlowMaxIfCount = 100 ;
273+ if (level == CheckLevel::normal) {
274+ // Checking should finish in reasonable time.
275+ checkLevel = level;
276+ performanceValueFlowMaxSubFunctionArgs = 8 ;
277+ performanceValueFlowMaxIfCount = 100 ;
278+ }
279+ else if (level == CheckLevel::exhaustive) {
280+ // Checking can take a little while. ~ 10 times slower than normal analysis is OK.
281+ checkLevel = CheckLevel::exhaustive;
282+ performanceValueFlowMaxIfCount = -1 ;
283+ performanceValueFlowMaxSubFunctionArgs = 256 ;
284+ }
286285}
287286
288287// TODO: auto generate these tables
0 commit comments