From f5325ada2051160fcbb69674f52247b0cda466ab Mon Sep 17 00:00:00 2001 From: Jan Kuhlmann <33833587+M2-TE@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:49:39 +0100 Subject: [PATCH] aggregate initialization for options --- graphs.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/graphs.hpp b/graphs.hpp index 87ac696..9ccc48c 100644 --- a/graphs.hpp +++ b/graphs.hpp @@ -153,8 +153,6 @@ namespace graphs struct options { - options() = default; - options(type_type type) : type(type) {} bool border = false; bool axis = true; bool axislabel = true; @@ -776,7 +774,7 @@ namespace graphs } template - int histogram(size_t height, size_t width, long double xmin, long double xmax, long double ymin, long double ymax, const T &aarray, const options &aoptions = {type_histogram}) + int histogram(size_t height, size_t width, long double xmin, long double xmax, long double ymin, long double ymax, const T &aarray, const options &aoptions = {.type = type_histogram}) { if (!graphs::size(aarray)) return 1; @@ -881,7 +879,7 @@ namespace graphs } template - int histogram(size_t height, size_t width, long double xmin, long double xmax, long double ymin, long double ymax, const size_t rows, T *aarray, const options &aoptions = {type_histogram}) + int histogram(size_t height, size_t width, long double xmin, long double xmax, long double ymin, long double ymax, const size_t rows, T *aarray, const options &aoptions = {.type = type_histogram}) { if (rows == 0) return 1;