mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:58:07 +02:00
Remove unused mapping parameter from MIME type detection
This commit is contained in:
parent
0da4669370
commit
660d8c4e92
5 changed files with 6 additions and 6 deletions
|
@ -45,12 +45,12 @@ std::shared_ptr<Serializer> FormatRegistry::getSerializerForMIMETypeID(FormatReg
|
||||||
return std::shared_ptr<Serializer>();
|
return std::shared_ptr<Serializer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Serializer> FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const {
|
std::shared_ptr<Serializer> FormatRegistry::getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const {
|
||||||
MIMETypeID id;
|
MIMETypeID id;
|
||||||
{
|
{
|
||||||
// TODO: shared_lock in C++14
|
// TODO: shared_lock in C++14
|
||||||
std::lock_guard<std::mutex> lock(*const_cast<std::mutex*>(&_libraryLock));
|
std::lock_guard<std::mutex> lock(*const_cast<std::mutex*>(&_libraryLock));
|
||||||
id = _mimeTypeLibrary.findMatchingMIMEType(data, mapping, url, webMediaType);
|
id = _mimeTypeLibrary.findMatchingMIMEType(data, url, webMediaType);
|
||||||
}
|
}
|
||||||
return getSerializerForMIMETypeID(id);
|
return getSerializerForMIMETypeID(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr<Serializer::Factory>& supportedFactory);
|
MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr<Serializer::Factory>& supportedFactory);
|
||||||
void unregisterMIMEType(const MIMETypeID& id);
|
void unregisterMIMEType(const MIMETypeID& id);
|
||||||
|
|
||||||
std::shared_ptr<Serializer> getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const;
|
std::shared_ptr<Serializer> getSerializerForMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const;
|
||||||
std::shared_ptr<Serializer> getSerializerForMIMETypeID(MIMETypeID id) const;
|
std::shared_ptr<Serializer> getSerializerForMIMETypeID(MIMETypeID id) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
|
|
||||||
hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const {
|
hfm::Model::Pointer ModelLoader::load(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const {
|
||||||
auto serializer = DependencyManager::get<ModelFormatRegistry>()->getSerializerForMIMEType(data, mapping, url, webMediaType);
|
auto serializer = DependencyManager::get<ModelFormatRegistry>()->getSerializerForMIMEType(data, url, webMediaType);
|
||||||
if (!serializer) {
|
if (!serializer) {
|
||||||
return hfm::Model::Pointer();
|
return hfm::Model::Pointer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const {
|
||||||
return MIMEType::NONE;
|
return MIMEType::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const {
|
MIMETypeLibrary::ID MIMETypeLibrary::findMatchingMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const {
|
||||||
// Check file contents
|
// Check file contents
|
||||||
for (auto& mimeType : _mimeTypes) {
|
for (auto& mimeType : _mimeTypes) {
|
||||||
for (auto& fileSignature : mimeType.mimeType.fileSignatures) {
|
for (auto& fileSignature : mimeType.mimeType.fileSignatures) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ public:
|
||||||
void unregisterMIMEType(const ID& id);
|
void unregisterMIMEType(const ID& id);
|
||||||
|
|
||||||
MIMEType getMIMEType(const ID& id) const;
|
MIMEType getMIMEType(const ID& id) const;
|
||||||
ID findMatchingMIMEType(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url, const std::string& webMediaType) const;
|
ID findMatchingMIMEType(const hifi::ByteArray& data, const hifi::URL& url, const std::string& webMediaType) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ID nextID { 1 };
|
ID nextID { 1 };
|
||||||
|
|
Loading…
Reference in a new issue