From 85b43f99343e4c47ccaf185130884c186a94ab07 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 5 Feb 2019 23:58:34 +0000 Subject: Removed messy typedef in favour of auto --- libdbpp/selectcommand.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp index 96b3276..661484c 100644 --- a/libdbpp/selectcommand.cpp +++ b/libdbpp/selectcommand.cpp @@ -53,9 +53,8 @@ DB::SelectCommand::operator[](unsigned int n) const const DB::Column& DB::SelectCommand::operator[](const Glib::ustring & n) const { - typedef Columns::nth_index<1>::type CbyName; - CbyName::iterator i = columns->get<1>().find(n.collate_key()); - if (i != columns->get<1>().end()) { + if (auto i = columns->get<1>().find(n.collate_key()); + i != columns->get<1>().end()) { return **i; } throw ColumnDoesNotExist(n); -- cgit v1.2.3