From 4268bee456c9d93756cc43b25e92a7d3c2419715 Mon Sep 17 00:00:00 2001 From: Romain Brenguier Date: Tue, 16 Apr 2019 07:39:28 +0100 Subject: [PATCH] Remove redundant get_ui() method ui_message_handler.get_ui() already does the same thing, and is more explicit. --- jbmc/src/janalyzer/janalyzer_parse_options.cpp | 5 +++-- jbmc/src/janalyzer/janalyzer_parse_options.h | 5 ----- src/goto-analyzer/goto_analyzer_parse_options.cpp | 5 +++-- src/goto-analyzer/goto_analyzer_parse_options.h | 5 ----- src/goto-instrument/goto_instrument_parse_options.cpp | 9 +++++---- src/goto-instrument/goto_instrument_parse_options.h | 5 ----- 6 files changed, 11 insertions(+), 23 deletions(-) diff --git a/jbmc/src/janalyzer/janalyzer_parse_options.cpp b/jbmc/src/janalyzer/janalyzer_parse_options.cpp index 77dd822eac..04578e70ad 100644 --- a/jbmc/src/janalyzer/janalyzer_parse_options.cpp +++ b/jbmc/src/janalyzer/janalyzer_parse_options.cpp @@ -389,7 +389,7 @@ int janalyzer_parse_optionst::doit() show_goto_functions( goto_model, log.get_message_handler(), - get_ui(), + ui_message_handler.get_ui(), cmdline.isset("list-goto-functions")); return CPROVER_EXIT_SUCCESS; } @@ -519,7 +519,8 @@ int janalyzer_parse_optionst::perform_analysis(const optionst &options) if(cmdline.isset("show-properties")) { - show_properties(goto_model, log.get_message_handler(), get_ui()); + show_properties( + goto_model, log.get_message_handler(), ui_message_handler.get_ui()); return CPROVER_EXIT_SUCCESS; } diff --git a/jbmc/src/janalyzer/janalyzer_parse_options.h b/jbmc/src/janalyzer/janalyzer_parse_options.h index 3140a94f72..f2ffed0966 100644 --- a/jbmc/src/janalyzer/janalyzer_parse_options.h +++ b/jbmc/src/janalyzer/janalyzer_parse_options.h @@ -171,11 +171,6 @@ protected: virtual int perform_analysis(const optionst &options); ai_baset *build_analyzer(const optionst &, const namespacet &ns); - - ui_message_handlert::uit get_ui() - { - return ui_message_handler.get_ui(); - } }; #endif // CPROVER_JANALYZER_JANALYZER_PARSE_OPTIONS_H diff --git a/src/goto-analyzer/goto_analyzer_parse_options.cpp b/src/goto-analyzer/goto_analyzer_parse_options.cpp index 0bda5470a0..ae371b7e00 100644 --- a/src/goto-analyzer/goto_analyzer_parse_options.cpp +++ b/src/goto-analyzer/goto_analyzer_parse_options.cpp @@ -424,7 +424,7 @@ int goto_analyzer_parse_optionst::doit() show_goto_functions( goto_model, log.get_message_handler(), - get_ui(), + ui_message_handler.get_ui(), cmdline.isset("list-goto-functions")); return CPROVER_EXIT_SUCCESS; } @@ -553,7 +553,8 @@ int goto_analyzer_parse_optionst::perform_analysis(const optionst &options) if(cmdline.isset("show-properties")) { - show_properties(goto_model, log.get_message_handler(), get_ui()); + show_properties( + goto_model, log.get_message_handler(), ui_message_handler.get_ui()); return CPROVER_EXIT_SUCCESS; } diff --git a/src/goto-analyzer/goto_analyzer_parse_options.h b/src/goto-analyzer/goto_analyzer_parse_options.h index ee063e657e..47affefd3a 100644 --- a/src/goto-analyzer/goto_analyzer_parse_options.h +++ b/src/goto-analyzer/goto_analyzer_parse_options.h @@ -174,11 +174,6 @@ protected: virtual int perform_analysis(const optionst &options); ai_baset *build_analyzer(const optionst &, const namespacet &ns); - - ui_message_handlert::uit get_ui() - { - return ui_message_handler.get_ui(); - } }; #endif // CPROVER_GOTO_ANALYZER_GOTO_ANALYZER_PARSE_OPTIONS_H diff --git a/src/goto-instrument/goto_instrument_parse_options.cpp b/src/goto-instrument/goto_instrument_parse_options.cpp index a16a95021c..003af39884 100644 --- a/src/goto-instrument/goto_instrument_parse_options.cpp +++ b/src/goto-instrument/goto_instrument_parse_options.cpp @@ -268,7 +268,7 @@ int goto_instrument_parse_optionst::doit() namespacet ns(goto_model.symbol_table); value_set_analysist value_set_analysis(ns); value_set_analysis(goto_model.goto_functions); - show_value_sets(get_ui(), goto_model, value_set_analysis); + show_value_sets(ui_message_handler.get_ui(), goto_model, value_set_analysis); return CPROVER_EXIT_SUCCESS; } @@ -564,7 +564,8 @@ int goto_instrument_parse_optionst::doit() cmdline.isset("show-properties")) { const namespacet ns(goto_model.symbol_table); - show_properties(goto_model, log.get_message_handler(), get_ui()); + show_properties( + goto_model, log.get_message_handler(), ui_message_handler.get_ui()); return CPROVER_EXIT_SUCCESS; } @@ -584,7 +585,7 @@ int goto_instrument_parse_optionst::doit() if(cmdline.isset("show-loops")) { - show_loop_ids(get_ui(), goto_model); + show_loop_ids(ui_message_handler.get_ui(), goto_model); return CPROVER_EXIT_SUCCESS; } @@ -637,7 +638,7 @@ int goto_instrument_parse_optionst::doit() if(cmdline.isset("show-locations")) { - show_locations(get_ui(), goto_model); + show_locations(ui_message_handler.get_ui(), goto_model); return CPROVER_EXIT_SUCCESS; } diff --git a/src/goto-instrument/goto_instrument_parse_options.h b/src/goto-instrument/goto_instrument_parse_options.h index e5b0b6c9e4..e3e5da49dc 100644 --- a/src/goto-instrument/goto_instrument_parse_options.h +++ b/src/goto-instrument/goto_instrument_parse_options.h @@ -147,11 +147,6 @@ protected: bool remove_returns_done; goto_modelt goto_model; - - ui_message_handlert::uit get_ui() - { - return ui_message_handler.get_ui(); - } }; #endif // CPROVER_GOTO_INSTRUMENT_GOTO_INSTRUMENT_PARSE_OPTIONS_H