mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
Fix a couple of warnings
- Conversion warning on clang: 'long' to 'size_t' - Unused variable warning on MSVC
This commit is contained in:
parent
38d8b8cfe2
commit
f2b36c2ed2
@ -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 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user