Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions python/src/core/contractors/codac2_py_CtcDeriv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ void export_contract(py::class_<CtcDeriv>& exported)
exported

.def("contract",
[](const CtcDeriv& ctc, Slice<T>& x, const Slice<T>& v, const std::vector<Index_type>& ctc_indices)
// ctc_indices is read only by the if constexpr branch taken for
// IntervalVector; in the Interval instantiation that branch is
// discarded and the parameter goes unread, which MSVC /W4 reports as
// C4100. It cannot be dropped -- pybind11 takes the Python signature
// from this lambda, and the argument is exposed just below.
[](const CtcDeriv& ctc, Slice<T>& x, const Slice<T>& v, [[maybe_unused]] const std::vector<Index_type>& ctc_indices)
-> py::tuple
{
if constexpr(std::is_same_v<T,IntervalVector>)
Expand All @@ -44,7 +49,9 @@ void export_contract(py::class_<CtcDeriv>& exported)
"x"_a, "v"_a, "ctc_indices"_a = std::vector<Index>())

.def("contract",
[](const CtcDeriv& ctc, SlicedTube<T>& x, const SlicedTube<T>& v, const std::vector<Index_type>& ctc_indices)
// Same as above: unread in the Interval instantiation, kept for the
// Python signature.
[](const CtcDeriv& ctc, SlicedTube<T>& x, const SlicedTube<T>& v, [[maybe_unused]] const std::vector<Index_type>& ctc_indices)
-> py::tuple
{
if constexpr(std::is_same_v<T,IntervalVector>)
Expand Down
3 changes: 3 additions & 0 deletions src/graphics/styles/codac2_StylePropertiesBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* \license GNU Lesser General Public License (LGPL)
*/

#include <iostream>
#include "codac2_StylePropertiesBase.h"

using namespace std;
Expand Down Expand Up @@ -35,6 +36,7 @@ void StylePropertiesBase::parse_parameter(const std::string& param)
}
catch (const std::invalid_argument& e)
{
std::cerr << "codac2: invalid line width value \"" << param.substr(2) << "\": " << e.what() << std::endl;
assert_release_constexpr(false && "Invalid line width value");
}
}
Expand All @@ -47,6 +49,7 @@ void StylePropertiesBase::parse_parameter(const std::string& param)
}
catch (const std::invalid_argument& e)
{
std::cerr << "codac2: invalid z-value \"" << param.substr(2) << "\": " << e.what() << std::endl;
assert_release_constexpr(false && "Invalid z-value");
}
}
Expand Down
Loading