From 08bb222df96dd5149aba4cbc88b7997c7cc10089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A0rius=20Mont=C3=B3n?= Date: Mon, 26 Apr 2021 00:36:46 +0200 Subject: [PATCH] code clean-up (using clang-tidy) --- src/Simulator.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Simulator.cpp b/src/Simulator.cpp index 5308349..d47a8d9 100644 --- a/src/Simulator.cpp +++ b/src/Simulator.cpp @@ -8,9 +8,6 @@ #define SC_INCLUDE_DYNAMIC_PROCESSES #include "systemc" -#include "tlm.h" -#include "tlm_utils/simple_initiator_socket.h" -#include "tlm_utils/simple_target_socket.h" #include #include @@ -66,7 +63,7 @@ SC_MODULE(Simulator) { } } - ~Simulator() { + ~Simulator() override { delete MainMemory; delete cpu; delete Bus; @@ -130,7 +127,6 @@ void process_arguments(int argc, char *argv[]) { break; default: std::cout << "unknown" << std::endl; - } } @@ -161,7 +157,7 @@ int sc_main(int argc, char *argv[]) { auto end = std::chrono::steady_clock::now(); std::chrono::duration elapsed_seconds = end - start; - double instructions = perf->getInstructions() / elapsed_seconds.count(); + double instructions = static_cast(perf->getInstructions()) / elapsed_seconds.count(); std::cout << "Total elapsed time: " << elapsed_seconds.count() << "s" << std::endl; std::cout << "Simulated " << int(std::round(instructions)) << " instr/sec" << std::endl;