pybind11/include
daizhirui 31d7c870cf
Remove some maybe-uninitialized warnings (#5516)
* Remove some maybe-uninitialized warnings

In the Eigen matrix type_caster, resize the matrix instead of assigning with a new one when the matrix size needs to be adjusted.

This can remove lots of compiling warnings about "maybe-uninitialized".

* Revert "Remove some maybe-uninitialized warnings"

This reverts commit 7d5a9b41aa.

* Suppress `-Wmaybe-uninitialized` warning

Reproducer: https://github.com/pybind/pybind11/pull/5516#issuecomment-2645846295

---------

Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
2025-02-08 10:43:25 -08:00
..
pybind11 Remove some maybe-uninitialized warnings (#5516) 2025-02-08 10:43:25 -08:00