mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
FIxing the compil bug by checking security of the call with assert and avoiding the compilation error
This commit is contained in:
parent
a60ef4fb5a
commit
1364329886
1 changed files with 4 additions and 10 deletions
|
@ -86,19 +86,13 @@ public:
|
|||
|
||||
template <class T> T& edit() {
|
||||
auto theConcept = std::dynamic_pointer_cast<typename T::JobModel>(_concept);
|
||||
if (theConcept) {
|
||||
return theConcept->_data;
|
||||
}
|
||||
assert(false);
|
||||
return T();
|
||||
assert(theConcept);
|
||||
return theConcept->_data;
|
||||
}
|
||||
template <class T> const T& get() const {
|
||||
auto theConcept = std::dynamic_pointer_cast<typename T::JobModel>(_concept);
|
||||
if (theConcept) {
|
||||
return theConcept->_data;
|
||||
}
|
||||
assert(false);
|
||||
return T();
|
||||
assert(theConcept);
|
||||
return theConcept->_data;
|
||||
}
|
||||
|
||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext) {
|
||||
|
|
Loading…
Reference in a new issue