Fix a couple of warnings

- Conversion warning on clang: 'long' to 'size_t'
- Unused variable warning on MSVC
This commit is contained in:
Dean Moldovan 2016-06-01 23:03:10 +02:00
parent 38d8b8cfe2
commit f2b36c2ed2
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ void init_issues(py::module &m) {
try { try {
py::class_<Placeholder>(m2, "Placeholder"); py::class_<Placeholder>(m2, "Placeholder");
throw std::logic_error("Expected an exception!"); throw std::logic_error("Expected an exception!");
} catch (std::runtime_error &e) { } catch (std::runtime_error &) {
/* All good */ /* All good */
} }
} }

View File

@ -139,7 +139,7 @@ protected:
const T *it = ptr; const T *it = ptr;
while (*it++ != (T) 0) while (*it++ != (T) 0)
; ;
return it - ptr; return static_cast<size_t>(it - ptr);
} }
const std::type_info **m_types = nullptr; const std::type_info **m_types = nullptr;