apply folding expression and std::optional

This commit is contained in:
Jinhao
2017-12-23 00:10:10 +08:00
parent 4917b18c70
commit be836b5b48
11 changed files with 58 additions and 28 deletions

View File

@@ -1450,7 +1450,7 @@ namespace API
restrict::wd_manager().set_safe_place(reinterpret_cast<basic_window*>(wd), std::move(fn));
}
optional<std::pair<size, size>> content_extent(window wd, unsigned limited_px, bool limit_width)
std::optional<std::pair<size, size>> content_extent(window wd, unsigned limited_px, bool limit_width)
{
auto iwd = reinterpret_cast<basic_window*>(wd);
internal_scope_guard lock;

View File

@@ -27,7 +27,7 @@ namespace nana{ namespace drawerbase
: trigger_{ t }
{}
optional<size> measure(graph_reference graph, unsigned limit_pixels, bool /*limit_width*/) const override
std::optional<size> measure(graph_reference graph, unsigned limit_pixels, bool /*limit_width*/) const override
{
//Button doesn't provide a support of vfit and hfit
if (limit_pixels)

View File

@@ -90,7 +90,7 @@ namespace nana
: drw_{ drwimpl }
{}
optional<size> measure(graph_reference graph, unsigned limit_pixels, bool /*limit_width*/) const override
std::optional<size> measure(graph_reference graph, unsigned limit_pixels, bool /*limit_width*/) const override
{
//Combox doesn't provide a support of vfit and hfit
if (limit_pixels)

View File

@@ -653,7 +653,7 @@ namespace nana
: impl_{ impl }
{}
optional<size> measure(graph_reference graph, unsigned limit_pixels, bool limit_width) const override
std::optional<size> measure(graph_reference graph, unsigned limit_pixels, bool limit_width) const override
{
//Label now doesn't support to measure content with a specified height.
if (graph && ((0 == limit_pixels) || limit_width))

View File

@@ -74,7 +74,7 @@ namespace nana
: impl_{impl}
{}
optional<size> measure(graph_reference /*graph*/, unsigned limit_pixels, bool /*limit_width*/) const override
std::optional<size> measure(graph_reference /*graph*/, unsigned limit_pixels, bool /*limit_width*/) const override
{
//Picture doesn't provide a support of vfit and hfit
if (!limit_pixels)