Skip to content

Commit b773df8

Browse files
committed
Replace deprecated PYBIND11_OVERLOAD* by PYBIND11_OVERRIDE*
1 parent e6fb484 commit b773df8

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Component.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ Component_Trampoline::Component_Trampoline()
4242
void Component_Trampoline::draw(const sofa::core::visual::VisualParams* params)
4343
{
4444
PythonEnvironment::executePython(this, [this, params](){
45-
PYBIND11_OVERLOAD(void, Component, draw, params);
45+
PYBIND11_OVERRIDE(void, Component, draw, params);
4646
});
4747
}
4848

4949
void Component_Trampoline::init()
5050
{
5151
PythonEnvironment::executePython(this, [this](){
5252
initializePythonCache();
53-
PYBIND11_OVERLOAD(void, Component, init, );
53+
PYBIND11_OVERRIDE(void, Component, init, );
5454
});
5555
}
5656

5757
void Component_Trampoline::reinit()
5858
{
5959
PythonEnvironment::executePython(this, [this](){
60-
PYBIND11_OVERLOAD(void, Component, reinit, );
60+
PYBIND11_OVERRIDE(void, Component, reinit, );
6161
});
6262
}
6363

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Controller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@ Controller_Trampoline::Controller_Trampoline()
5050
void Controller_Trampoline::draw(const sofa::core::visual::VisualParams* params)
5151
{
5252
PythonEnvironment::executePython(this, [this, params](){
53-
PYBIND11_OVERLOAD(void, Controller, draw, params);
53+
PYBIND11_OVERRIDE(void, Controller, draw, params);
5454
});
5555
}
5656

5757
void Controller_Trampoline::init()
5858
{
5959
PythonEnvironment::executePython(this, [this](){
6060
initializePythonCache();
61-
PYBIND11_OVERLOAD(void, Controller, init, );
61+
PYBIND11_OVERRIDE(void, Controller, init, );
6262
});
6363
}
6464

6565
void Controller_Trampoline::reinit()
6666
{
6767
PythonEnvironment::executePython(this, [this](){
68-
PYBIND11_OVERLOAD(void, Controller, reinit, );
68+
PYBIND11_OVERRIDE(void, Controller, reinit, );
6969
});
7070
}
7171

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_DataEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ std::string DataEngine_Trampoline::getClassName() const
5151
void DataEngine_Trampoline::init()
5252
{
5353
PythonEnvironment::executePython(this, [this](){
54-
PYBIND11_OVERLOAD(void, DataEngine, init, );
54+
PYBIND11_OVERRIDE(void, DataEngine, init, );
5555
});
5656
}
5757

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_ForceField.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace sofapython3
8484
if(!mstate.get())
8585
throw py::type_error("Missing mechanical state.");
8686

87-
PYBIND11_OVERLOAD(void, ForceField<TDOFType>, init,);
87+
PYBIND11_OVERRIDE(void, ForceField<TDOFType>, init,);
8888
}
8989

9090
template<class TDOFType>
@@ -99,7 +99,7 @@ namespace sofapython3
9999
"kFactor"_a=mparams->kFactor(),
100100
"isImplicit"_a=mparams->implicit(),
101101
"energy"_a=mparams->energy());
102-
PYBIND11_OVERLOAD_PURE(void, ForceField<TDOFType>, addForce, mp, PythonFactory::toPython(&f), PythonFactory::toPython(&x), PythonFactory::toPython(&v));
102+
PYBIND11_OVERRIDE_PURE(void, ForceField<TDOFType>, addForce, mp, PythonFactory::toPython(&f), PythonFactory::toPython(&x), PythonFactory::toPython(&v));
103103
}
104104

105105
template<class TDOFType>
@@ -114,7 +114,7 @@ namespace sofapython3
114114
"kFactor"_a=mparams->kFactor(),
115115
"isImplicit"_a=mparams->implicit()
116116
);
117-
PYBIND11_OVERLOAD_PURE(void, ForceField<TDOFType>, addDForce, mp, PythonFactory::toPython(&df), PythonFactory::toPython(&dx));
117+
PYBIND11_OVERRIDE_PURE(void, ForceField<TDOFType>, addDForce, mp, PythonFactory::toPython(&df), PythonFactory::toPython(&dx));
118118
}
119119

120120

@@ -129,7 +129,7 @@ namespace sofapython3
129129
"isImplicit"_a=mparams->implicit()
130130
);
131131

132-
PYBIND11_OVERLOAD_PURE(py::object, ForceField<TDOFType>, addKToMatrix, mp, nIndices, nDofs);
132+
PYBIND11_OVERRIDE_PURE(py::object, ForceField<TDOFType>, addKToMatrix, mp, nIndices, nDofs);
133133
}
134134

135135
template<class TDOFType>

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Mapping.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace sofapython3
9292
"isImplicit"_a=mparams->implicit(),
9393
"energy"_a=mparams->energy());
9494

95-
PYBIND11_OVERLOAD_PURE(void, Inherit1, apply, mp,
95+
PYBIND11_OVERRIDE_PURE(void, Inherit1, apply, mp,
9696
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
9797
}
9898

@@ -108,7 +108,7 @@ namespace sofapython3
108108
"isImplicit"_a=mparams->implicit(),
109109
"energy"_a=mparams->energy());
110110

111-
PYBIND11_OVERLOAD_PURE(void, Inherit1, applyJ, mp,
111+
PYBIND11_OVERRIDE_PURE(void, Inherit1, applyJ, mp,
112112
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
113113
}
114114

@@ -123,7 +123,7 @@ namespace sofapython3
123123
"isImplicit"_a=mparams->implicit(),
124124
"energy"_a=mparams->energy());
125125

126-
PYBIND11_OVERLOAD_PURE(void, Inherit1, applyJT, mp,
126+
PYBIND11_OVERRIDE_PURE(void, Inherit1, applyJT, mp,
127127
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
128128
}
129129

@@ -135,7 +135,7 @@ namespace sofapython3
135135

136136
py::dict mp = py::dict("time"_a=getContext()->getTime());
137137

138-
PYBIND11_OVERLOAD_PURE(void, Inherit1, applyConstraintsJT, mp,
138+
PYBIND11_OVERRIDE_PURE(void, Inherit1, applyConstraintsJT, mp,
139139
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
140140
}
141141

bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Prefab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void Prefab_Trampoline::doReInit()
6161
}
6262
try{
6363
this->d_componentState.setValue(sofa::core::objectmodel::ComponentState::Valid);
64-
PYBIND11_OVERLOAD(void, Prefab, doReInit, );
64+
PYBIND11_OVERRIDE(void, Prefab, doReInit, );
6565
} catch (std::exception& e)
6666
{
6767
this->d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);

0 commit comments

Comments
 (0)