Skip to content

Commit aab27e5

Browse files
committed
Fix faulty double const additions
1 parent 287527f commit aab27e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/pybind11/cast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class type_caster<void> : public type_caster<void_type> {
268268
}
269269

270270
/* Check if this is a C++ type */
271-
const const auto &bases = all_type_info((PyTypeObject *) type::handle_of(h).ptr());
271+
const auto &bases = all_type_info((PyTypeObject *) type::handle_of(h).ptr());
272272
if (bases.size() == 1) { // Only allowing loading from a single-value type
273273
value = values_and_holders(reinterpret_cast<instance *>(h.ptr())).begin()->value_ptr();
274274
return true;

include/pybind11/pybind11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class cpp_function : public function {
384384
std::string signature;
385385
size_t type_index = 0, arg_index = 0;
386386
bool is_starred = false;
387-
for (const const auto *pc = text; *pc != '\0'; ++pc) {
387+
for (const auto *pc = text; *pc != '\0'; ++pc) {
388388
const auto c = *pc;
389389

390390
if (c == '{') {

0 commit comments

Comments
 (0)