+ returning mapnik::parameter makes more sense in this context (?)
This commit is contained in:
parent
8e78bb3c20
commit
e68a65db33
1 changed files with 2 additions and 3 deletions
|
@ -135,7 +135,7 @@ mapnik::value_holder get_params_by_key2(mapnik::parameters const& p, std::string
|
|||
return pos->second;
|
||||
}
|
||||
|
||||
mapnik::value_holder get_params_by_index(mapnik::parameters const& p, int index)
|
||||
mapnik::parameter get_params_by_index(mapnik::parameters const& p, int index)
|
||||
{
|
||||
if (index < 0 || static_cast<unsigned>(index) > p.size())
|
||||
{
|
||||
|
@ -144,11 +144,10 @@ mapnik::value_holder get_params_by_index(mapnik::parameters const& p, int index)
|
|||
}
|
||||
|
||||
parameters::const_iterator itr = p.begin();
|
||||
parameters::const_iterator end = p.end();
|
||||
std::advance(itr, index);
|
||||
if (itr != p.end())
|
||||
{
|
||||
return itr->second;
|
||||
return *itr;
|
||||
}
|
||||
PyErr_SetString(PyExc_IndexError, "Index is out of range");
|
||||
throw boost::python::error_already_set();
|
||||
|
|
Loading…
Add table
Reference in a new issue