mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 11:17:32 +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 <shared/HifiTypes.h>
|
||||||
#include <hfm/HFM.h>
|
#include <hfm/HFM.h>
|
||||||
|
#include <hfm/HFMSerializer.h>
|
||||||
|
|
||||||
class ModelLoader {
|
class ModelLoader {
|
||||||
public:
|
public:
|
||||||
|
@ -75,7 +76,10 @@ protected:
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static Loader getLoader() {
|
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 [](const hifi::ByteArray& bytes, const hifi::VariantHash& mapping, const hifi::URL& url) -> hfm::Model::Pointer {
|
||||||
return T().read(bytes, mapping, url);
|
return T().read(bytes, mapping, url);
|
||||||
|
|
Loading…
Reference in a new issue