1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-08-14 14:49:48 +00:00

Don't scatter the casted type throughout the code.

This commit is contained in:
King_DuckZ 2015-12-14 13:05:13 +00:00
parent 45e5b7bc8d
commit 2b7d8a6783
2 changed files with 6 additions and 3 deletions

View file

@ -25,10 +25,13 @@
#include <ciso646>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/lexical_cast.hpp>
namespace din {
namespace {
IDDescMap fetch_existing_ids (pq::Connection& parConn, const std::vector<uint32_t>& parIDs) {
using boost::lexical_cast;
IDDescMap retmap;
if (parIDs.empty()) {
return std::move(retmap);
@ -41,7 +44,7 @@ namespace din {
auto resultset = parConn.query(oss.str());
for (const auto& record : resultset) {
retmap[std::stoul(record["id"])] = record["desc"];
retmap[lexical_cast<IDDescMap::key_type>(record["id"])] = record["desc"];
}
return std::move(retmap);
}