GUI2: praise auto
This commit is contained in:
parent
97acce2064
commit
b0d18afd2f
4 changed files with 4 additions and 11 deletions
|
@ -34,8 +34,6 @@
|
|||
#include "video.hpp"
|
||||
#include "wml_exception.hpp"
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace gui2
|
||||
{
|
||||
|
||||
|
|
|
@ -671,8 +671,7 @@ void distributor::keyboard_add_to_chain(widget* widget)
|
|||
void distributor::keyboard_remove_from_chain(widget* w)
|
||||
{
|
||||
assert(w);
|
||||
std::vector<widget*>::iterator itor = std::find(
|
||||
keyboard_focus_chain_.begin(), keyboard_focus_chain_.end(), w);
|
||||
auto itor = std::find(keyboard_focus_chain_.begin(), keyboard_focus_chain_.end(), w);
|
||||
|
||||
if(itor != keyboard_focus_chain_.end()) {
|
||||
keyboard_focus_chain_.erase(itor);
|
||||
|
@ -803,10 +802,7 @@ void distributor::signal_handler_notify_removal(dispatcher& w,
|
|||
if(keyboard_focus_ == &w) {
|
||||
keyboard_focus_ = nullptr;
|
||||
}
|
||||
const std::vector<widget*>::iterator itor
|
||||
= std::find(keyboard_focus_chain_.begin(),
|
||||
keyboard_focus_chain_.end(),
|
||||
&w);
|
||||
const auto itor = std::find(keyboard_focus_chain_.begin(), keyboard_focus_chain_.end(), &w);
|
||||
if(itor != keyboard_focus_chain_.end()) {
|
||||
keyboard_focus_chain_.erase(itor);
|
||||
}
|
||||
|
|
|
@ -75,8 +75,7 @@ public:
|
|||
*/
|
||||
void disconnect_notifiee(notifiee<functor_t>& target)
|
||||
{
|
||||
typename std::map<notifiee<functor_t>*, functor_t>::iterator itor
|
||||
= notifiees_.find(&target);
|
||||
auto itor = notifiees_.find(&target);
|
||||
|
||||
if(itor != notifiees_.end()) {
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ bool execute_timer(const std::size_t id)
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(timers_mutex);
|
||||
|
||||
std::map<size_t, timer>::iterator itor = get_timers().find(id);
|
||||
auto itor = get_timers().find(id);
|
||||
if(itor == get_timers().end()) {
|
||||
LOG_GUI_E << "Can't execute timer since it no longer exists.\n";
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue