Fix debug/clang build issues

This commit is contained in:
Jason Turner
2016-06-29 17:27:07 -06:00
parent b0f07cbe5d
commit e44724c780
7 changed files with 38 additions and 37 deletions

View File

@@ -231,8 +231,8 @@ namespace chaiscript
auto pointer_sentinel(std::shared_ptr<T> &ptr) const
{
struct Sentinel {
Sentinel(std::shared_ptr<T> &ptr, Data &data)
: m_ptr(ptr), m_data(data)
Sentinel(std::shared_ptr<T> &t_ptr, Data &data)
: m_ptr(t_ptr), m_data(data)
{
}

View File

@@ -1404,7 +1404,7 @@ namespace chaiscript
static typename Container::const_iterator find_keyed_value(const Container &t_c, const Key &t_key, const size_t t_hint)
{
if (t_c.size() > t_hint && t_c[t_hint].first == t_key) {
return std::next(t_c.begin(), t_hint);
return std::next(t_c.begin(), static_cast<typename std::iterator_traits<typename Container::const_iterator>::difference_type>(t_hint));
} else {
return find_keyed_value(t_c, t_key);
}