From 1f66a584278dfd1ad88be19d5e4996302793a191 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Mon, 18 Jul 2016 10:47:10 +0200 Subject: [PATCH] pybind11.h: minor cleanups (no functionality change) --- include/pybind11/pybind11.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 02296671..a6255d8d 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -421,15 +421,15 @@ protected: /* When an exception is caught, give each registered exception translator a chance to translate it to a Python exception in reverse order of registration. - + A translator may choose to do one of the following: - + - catch the exception and call PyErr_SetString or PyErr_SetObject to set a standard (or custom) Python exception, or - do nothing and let the exception fall through to the next translator, or - delegate translation to the next translator by throwing a new type of exception. */ - auto last_exception = std::current_exception(); + auto last_exception = std::current_exception(); auto ®istered_exception_translators = pybind11::detail::get_internals().registered_exception_translators; for (auto& translator : registered_exception_translators) { try { @@ -476,8 +476,7 @@ protected: } msg += " Invoked with: "; tuple args_(args, true); - for( std::size_t ti = overloads->is_constructor ? 1 : 0; ti < args_.size(); ++ti) - { + for (size_t ti = overloads->is_constructor ? 1 : 0; ti < args_.size(); ++ti) { msg += static_cast(static_cast(args_[ti]).str()); if ((ti + 1) != args_.size() ) msg += ", ";