diff --git a/src/nrnpython/CMakeLists.txt b/src/nrnpython/CMakeLists.txt index 3141666b26..7b87e9a927 100644 --- a/src/nrnpython/CMakeLists.txt +++ b/src/nrnpython/CMakeLists.txt @@ -14,15 +14,15 @@ install(TARGETS rxdmath DESTINATION ${NRN_INSTALL_SHARE_LIB_DIR}) # minimal nanobind interface # ============================================================================= add_library(nanobind INTERFACE) -target_sources(nanobind INTERFACE - ${NB_DIR}/src/common.cpp - ${NB_DIR}/src/error.cpp - ${NB_DIR}/src/nb_internals.cpp - ${NB_DIR}/src/nb_static_property.cpp - ${NB_DIR}/src/nb_type.cpp - ${NB_DIR}/src/nb_func.cpp - ${NB_DIR}/src/implicit.cpp - ) +target_sources( + nanobind + INTERFACE ${NB_DIR}/src/common.cpp + ${NB_DIR}/src/error.cpp + ${NB_DIR}/src/nb_internals.cpp + ${NB_DIR}/src/nb_static_property.cpp + ${NB_DIR}/src/nb_type.cpp + ${NB_DIR}/src/nb_func.cpp + ${NB_DIR}/src/implicit.cpp) target_include_directories(nanobind INTERFACE "${NB_DIR}/include" "${NB_DIR}/ext/robin_map/include") # ============================================================================= diff --git a/src/nrnpython/nrnpy_hoc.cpp b/src/nrnpython/nrnpy_hoc.cpp index b9ad2ad1b7..f2da2085ea 100644 --- a/src/nrnpython/nrnpy_hoc.cpp +++ b/src/nrnpython/nrnpy_hoc.cpp @@ -2404,7 +2404,7 @@ static IvocVect* nrnpy_vec_from_python(void* v) { hoc_execerror(hoc_object_name(ho), " does not support the Python Sequence or Iterator protocol"); } - for(nb::handle item : po) { + for (nb::handle item: po) { if (!PyNumber_Check(item.ptr())) { char buf[50]; Sprintf(buf, "Some list items are not a number"); @@ -2423,7 +2423,7 @@ static IvocVect* nrnpy_vec_from_python(void* v) { x[i] = *(double*) (y + j); } } else { - for (long i=0; i