mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Fix assert in ModelLoader.h
This commit is contained in:
parent
fd83ae231b
commit
df1083970f
1 changed files with 5 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include <shared/HifiTypes.h>
|
||||
#include <hfm/HFM.h>
|
||||
#include <hfm/HFMSerializer.h>
|
||||
|
||||
class ModelLoader {
|
||||
public:
|
||||
|
@ -75,7 +76,10 @@ protected:
|
|||
|
||||
template <typename T>
|
||||
static Loader getLoader() {
|
||||
assert(dynamic_cast<hfm::Serializer*>(&T()));
|
||||
assert([](){
|
||||
T t;
|
||||
return dynamic_cast<hfm::Serializer*>(&t) != nullptr;
|
||||
}());
|
||||
|
||||
return [](const hifi::ByteArray& bytes, const hifi::VariantHash& mapping, const hifi::URL& url) -> hfm::Model::Pointer {
|
||||
return T().read(bytes, mapping, url);
|
||||
|
|
Loading…
Reference in a new issue