fix some compiler errors and warnings

This commit is contained in:
Jinhao
2016-10-31 06:36:03 +08:00
parent b1ce0eaff2
commit 043ebad317
2 changed files with 69 additions and 70 deletions

View File

@@ -1117,9 +1117,9 @@ namespace nana
delete impl_;
}
auto menu::append(std::string text_utf8, const menu::event_fn_t& f) -> item_proxy
auto menu::append(std::string text_utf8, const menu::event_fn_t& callback) -> item_proxy
{
impl_->mbuilder.data().items.emplace_back(new item_type(std::move(text_utf8, callback));
impl_->mbuilder.data().items.emplace_back(new item_type(std::move(text_utf8), callback));
return item_proxy(size() - 1, *impl_->mbuilder.data().items.back());
}
@@ -1159,7 +1159,7 @@ namespace nana
void menu::text(std::size_t index, std::string text_utf8)
{
impl_->mbuilder.data().items.at(index).text.swap(text_utf8);
impl_->mbuilder.data().items.at(index)->text.swap(text_utf8);
}
bool menu::link(std::size_t index, menu& menu_obj)