summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-05 23:58:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-05 23:58:34 +0000
commit85b43f99343e4c47ccaf185130884c186a94ab07 (patch)
tree8596f61c6718e9d2643ae0070d08fc004c94ddb7
parentTemplate key arg for deriving comparator (diff)
downloadlibdbpp-85b43f99343e4c47ccaf185130884c186a94ab07.tar.bz2
libdbpp-85b43f99343e4c47ccaf185130884c186a94ab07.tar.xz
libdbpp-85b43f99343e4c47ccaf185130884c186a94ab07.zip
Removed messy typedef in favour of auto
-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);