apply folding expression and std::optional
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -414,45 +414,47 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>&) const
|
||||
#ifndef _nana_cxx_folding_expression
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>&)
|
||||
{}
|
||||
#endif
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const char* arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const char* arg)
|
||||
{
|
||||
v.emplace_back(arg);
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const std::string& arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const std::string& arg)
|
||||
{
|
||||
v.emplace_back(arg);
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::string& arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::string& arg)
|
||||
{
|
||||
v.emplace_back(arg);
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::string&& arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::string&& arg)
|
||||
{
|
||||
v.emplace_back(std::move(arg));
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const wchar_t* arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const wchar_t* arg)
|
||||
{
|
||||
v.emplace_back(to_utf8(arg));
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const std::wstring& arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, const std::wstring& arg)
|
||||
{
|
||||
v.emplace_back(to_utf8(arg));
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::wstring& arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::wstring& arg)
|
||||
{
|
||||
v.emplace_back(to_utf8(arg));
|
||||
}
|
||||
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::wstring&& arg) const
|
||||
void internationalization::_m_fetch_args(std::vector<std::string>& v, std::wstring&& arg)
|
||||
{
|
||||
v.emplace_back(to_utf8(arg));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user