mirror of
https://github.com/tdulcet/Table-and-Graph-Libs.git
synced 2025-10-14 23:04:59 +08:00
aggregate initialization for options
This commit is contained in:
@@ -153,8 +153,6 @@ namespace graphs
|
|||||||
|
|
||||||
struct options
|
struct options
|
||||||
{
|
{
|
||||||
options() = default;
|
|
||||||
options(type_type type) : type(type) {}
|
|
||||||
bool border = false;
|
bool border = false;
|
||||||
bool axis = true;
|
bool axis = true;
|
||||||
bool axislabel = true;
|
bool axislabel = true;
|
||||||
@@ -776,7 +774,7 @@ namespace graphs
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
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))
|
if (!graphs::size(aarray))
|
||||||
return 1;
|
return 1;
|
||||||
@@ -881,7 +879,7 @@ namespace graphs
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
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)
|
if (rows == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user