fixing: tabbar append error in gcc linux - travis

see: https://travis-ci.org/cnjinhao/nana/jobs/109245565
This commit is contained in:
qPCR4vir 2016-02-15 11:30:16 +01:00
parent 09eaea0fad
commit 48db4528d6
2 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@ -41,4 +41,4 @@ CMakeFiles/
.idea/
cmake_install.cmake
*.DS_Store
.idea/

View File

@ -263,13 +263,13 @@ namespace nana
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 = {})
{
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));
if (attach_wd)
@ -299,7 +299,7 @@ namespace nana
if (pos > length())
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);
}