diff --git a/include/nana/gui/widgets/listbox.hpp b/include/nana/gui/widgets/listbox.hpp index 2bc5a9e1..7d64db42 100644 --- a/include/nana/gui/widgets/listbox.hpp +++ b/include/nana/gui/widgets/listbox.hpp @@ -170,7 +170,7 @@ namespace nana ::std::string text; format_ptr custom_format; - cell() noexcept = default; + cell() = default; cell(const cell&); cell(cell&&) noexcept; cell(::std::string) noexcept; diff --git a/include/nana/key_type.hpp b/include/nana/key_type.hpp index e2539be2..8d77edbd 100644 --- a/include/nana/key_type.hpp +++ b/include/nana/key_type.hpp @@ -1,7 +1,7 @@ /* * A Key Implementation * Nana C++ Library(http://www.nanapro.org) -* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com) +* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/include/nana/system/dataexch.hpp b/include/nana/system/dataexch.hpp index 7d9ded94..226515b6 100644 --- a/include/nana/system/dataexch.hpp +++ b/include/nana/system/dataexch.hpp @@ -1,6 +1,6 @@ /* * Data Exchanger Implementation - * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/basic_types.cpp b/source/basic_types.cpp index 0523a3c0..8186c53d 100644 --- a/source/basic_types.cpp +++ b/source/basic_types.cpp @@ -1,7 +1,7 @@ /* * Basic Types definition * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 3c9ededc..33006c31 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -96,7 +96,7 @@ namespace nana } }); - tmr_.elapse([this](const arg_elapse& arg) + tmr_.elapse([this](const arg_elapse&) { auto curs = ::nana::API::cursor_position(); ::nana::API::calc_window_point(window_handle_, curs); @@ -295,13 +295,13 @@ namespace nana origin_.y = 0; bool changed = false; - if (!horz_.empty() && (horz_.value() != origin_.x)) + if (!horz_.empty() && (static_cast(horz_.value()) != origin_.x)) { horz_.value(origin_.x); changed = true; } - if ((!vert_.empty()) && (vert_.value() != origin_.y)) + if ((!vert_.empty()) && (static_cast(vert_.value()) != origin_.y)) { vert_.value(origin_.y); changed = true; @@ -934,7 +934,13 @@ namespace nana auto col_from = std::move(*i); cont_.erase(i); + //A workaround for old libstdc++, that some operations of vector + //don't accept const iterator. +#ifdef _MSC_VER for (auto u = cont_.cbegin(); u != cont_.cend(); ++u) +#else + for (auto u = cont_.begin(); u != cont_.end(); ++u) +#endif { if (to == u->index) { @@ -1372,7 +1378,13 @@ namespace nana /// will use the key to insert new cat before the first cat with compare less than the key, or at the end of the list of cat and return a ref to that new cat. ? category_t* create_cat(std::shared_ptr& ptr) { + //A workaround for old version of libstdc++ + //Some operations of vector provided by libstdc++ don't accept const iterator. +#ifdef _MSC_VER for (auto i = categories_.cbegin(); i != categories_.cend(); ++i) +#else + for (auto i = categories_.begin(); i != categories_.end(); ++i) +#endif { if (i->key_ptr) { @@ -1810,8 +1822,13 @@ namespace nana if (categories_.size() > 1) { - auto i = categories_.cbegin(); - categories_.erase(++i, categories_.cend()); + //A workaround for old version of libstdc++ + //Some operations of vector provided by libstdc++ don't accept const iterator. +#ifdef _MSC_VER + categories_.erase(++categories_.cbegin(), categories_.cend()); +#else + categories_.erase(++categories_.begin(), categories_.end()); +#endif } } @@ -2579,7 +2596,12 @@ namespace nana } } +#ifdef _MSC_VER for(auto i = mouse_selection.selections.cbegin(); i != mouse_selection.selections.cend();) +#else + for(auto i = mouse_selection.selections.begin(); i != mouse_selection.selections.end();) + +#endif { if (selections.cend() == std::find_if(selections.cbegin(), selections.cend(), pred_mouse_selection{*i})) { @@ -3257,7 +3279,7 @@ namespace nana cat_proxy(ess_, pos.cat).at(pos.item).select(true); } - void hovered(index_type pos) override + void hovered(index_type /*pos*/) override { auto offset = ess_->intermed->origin().y / ess_->item_height(); @@ -3308,7 +3330,7 @@ namespace nana } } - void es_lister::move_select(bool upwards, bool unselect_previous, bool trace_selected) noexcept + void es_lister::move_select(bool upwards, bool unselect_previous, bool /*trace_selected*/) noexcept { auto next_selected_dpl = index_cast_noexcpt(last_selected_abs, false); //convert absolute position to display position diff --git a/source/gui/widgets/treebox.cpp b/source/gui/widgets/treebox.cpp index 76f6dc20..f383bd25 100644 --- a/source/gui/widgets/treebox.cpp +++ b/source/gui/widgets/treebox.cpp @@ -1,7 +1,7 @@ /* * A Treebox Implementation * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/internationalization.cpp b/source/internationalization.cpp index cbbebabe..87c92437 100644 --- a/source/internationalization.cpp +++ b/source/internationalization.cpp @@ -1,7 +1,7 @@ /* * An Implementation of i18n * Nana C++ Library(http://www.nanapro.org) -* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com) +* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/system/dataexch.cpp b/source/system/dataexch.cpp index 8648ed1c..acc96273 100644 --- a/source/system/dataexch.cpp +++ b/source/system/dataexch.cpp @@ -1,6 +1,6 @@ /* * Data Exchanger Implementation - * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -116,7 +116,8 @@ namespace nana{ namespace system{ //#elif defined(NANA_X11) #else static_cast(g); //eliminate unused parameter compiler warning. - throw "not implemented yet."; + static_cast(owner); + throw std::logic_error("dataexch::set(const paint::graphics&, native_window_type owner) not implemented yet."); return false; #endif }