fixing: tabbar append error in gcc linux - travis
see: https://travis-ci.org/cnjinhao/nana/jobs/109245565
This commit is contained in:
parent
09eaea0fad
commit
48db4528d6
2
.gitignore
vendored
2
.gitignore
vendored
@ -41,4 +41,4 @@ CMakeFiles/
|
|||||||
.idea/
|
.idea/
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
.idea/
|
|
||||||
|
|||||||
@ -263,13 +263,13 @@ namespace nana
|
|||||||
|
|
||||||
tabbar& append(std::string text, window attach_wd, value_type value = {})
|
tabbar& append(std::string text, window attach_wd, value_type value = {})
|
||||||
{
|
{
|
||||||
return this->append(static_cast<std::wstring>(nana::charset(text, nana::unicode::utf8)), attach_wd);
|
return this->append( std::wstring((nana::charset(std::move(text), nana::unicode::utf8))), attach_wd, std::move(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
tabbar& append(std::wstring text, window attach_wd, value_type value = {})
|
tabbar& append(std::wstring text, window attach_wd, value_type value = {})
|
||||||
{
|
{
|
||||||
if (attach_wd && API::empty_window(attach_wd))
|
if (attach_wd && API::empty_window(attach_wd))
|
||||||
throw std::invalid_argument("tabbar.attach: invalid window handle");
|
throw std::invalid_argument("Appening a tab to a tabbar - error: tabbar.attach: invalid window handle");
|
||||||
|
|
||||||
this->get_drawer_trigger().insert(::nana::npos, std::move(text), std::move(value));
|
this->get_drawer_trigger().insert(::nana::npos, std::move(text), std::move(value));
|
||||||
if (attach_wd)
|
if (attach_wd)
|
||||||
@ -299,7 +299,7 @@ namespace nana
|
|||||||
if (pos > length())
|
if (pos > length())
|
||||||
throw std::out_of_range("tabbar::insert invalid position");
|
throw std::out_of_range("tabbar::insert invalid position");
|
||||||
|
|
||||||
this->get_drawer_trigger().insert(pos, to_nstring(text), std::move(value));
|
this->get_drawer_trigger().insert(pos, to_nstring(std::move(text)), std::move(value));
|
||||||
API::update_window(*this);
|
API::update_window(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user