From 781993e326af1b2a1b687606023a39bd349929b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Wed, 20 Sep 2023 17:54:15 +0200 Subject: [PATCH] Resolve some warnings --- src/Platform/CMakeLists.txt | 1 + src/Platform/ReportConsole.h | 2 +- src/Platform/ReportExcel.cc | 10 +++++----- src/Platform/ReportExcel.h | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Platform/CMakeLists.txt b/src/Platform/CMakeLists.txt index 2a506b8..e55320b 100644 --- a/src/Platform/CMakeLists.txt +++ b/src/Platform/CMakeLists.txt @@ -4,6 +4,7 @@ include_directories(${BayesNet_SOURCE_DIR}/lib/Files) include_directories(${BayesNet_SOURCE_DIR}/lib/mdlp) include_directories(${BayesNet_SOURCE_DIR}/lib/argparse/include) include_directories(${BayesNet_SOURCE_DIR}/lib/json/include) +include_directories(${BayesNet_SOURCE_DIR}/lib/libxlsxwriter/include) add_executable(main main.cc Folding.cc platformUtils.cc Experiment.cc Datasets.cc Models.cc ReportConsole.cc ReportBase.cc) add_executable(manage manage.cc Results.cc ReportConsole.cc ReportExcel.cc ReportBase.cc Datasets.cc platformUtils.cc) add_executable(list list.cc platformUtils Datasets.cc) diff --git a/src/Platform/ReportConsole.h b/src/Platform/ReportConsole.h index 3dcc719..127e269 100644 --- a/src/Platform/ReportConsole.h +++ b/src/Platform/ReportConsole.h @@ -18,7 +18,7 @@ namespace platform { void header() override; void body() override; void footer(double totalScore); - void showSummary(); + void showSummary() override; }; }; #endif \ No newline at end of file diff --git a/src/Platform/ReportExcel.cc b/src/Platform/ReportExcel.cc index 381a3d8..1b6d74e 100644 --- a/src/Platform/ReportExcel.cc +++ b/src/Platform/ReportExcel.cc @@ -162,11 +162,11 @@ namespace platform { strcpy(line, data["title"].get().c_str()); lxw_doc_properties properties = { .title = line, - .subject = "Machine learning results", - .author = "Ricardo Montañana Gómez", - .manager = "Dr. J. A. Gámez, Dr. J. M. Puerta", - .company = "UCLM", - .comments = "Created with libxlsxwriter and c++", + .subject = (char*)"Machine learning results", + .author = (char*)"Ricardo Montañana Gómez", + .manager = (char*)"Dr. J. A. Gámez, Dr. J. M. Puerta", + .company = (char*)"UCLM", + .comments = (char*)"Created with libxlsxwriter and c++", }; workbook_set_properties(workbook, &properties); } diff --git a/src/Platform/ReportExcel.h b/src/Platform/ReportExcel.h index c5d462f..75c8a02 100644 --- a/src/Platform/ReportExcel.h +++ b/src/Platform/ReportExcel.h @@ -21,7 +21,6 @@ namespace platform { void setProperties(); void createFile(); void closeFile(); - void showSummary(); lxw_workbook* workbook; lxw_worksheet* worksheet; map styles; @@ -33,6 +32,7 @@ namespace platform { const string fileName = "some_results.xlsx"; void header() override; void body() override; + void showSummary() override; void footer(double totalScore, int row); void createStyle(const string& name, lxw_format* style, bool odd); void addColor(lxw_format* style, bool odd);