summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/selectcommand.cpp5
1 files 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);