mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 09:46:29 +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>();
|
||||
}
|
||||
|
||||
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;
|
||||
{
|
||||
// TODO: shared_lock in C++14
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
MIMETypeID registerMIMEType(const MIMEType& mimeType, std::unique_ptr<Serializer::Factory>& supportedFactory);
|
||||
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;
|
||||
|
||||
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 {
|
||||
auto serializer = DependencyManager::get<ModelFormatRegistry>()->getSerializerForMIMEType(data, mapping, url, webMediaType);
|
||||
auto serializer = DependencyManager::get<ModelFormatRegistry>()->getSerializerForMIMEType(data, url, webMediaType);
|
||||
if (!serializer) {
|
||||
return hfm::Model::Pointer();
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ MIMEType MIMETypeLibrary::getMIMEType(const MIMETypeLibrary::ID& id) const {
|
|||
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
|
||||
for (auto& mimeType : _mimeTypes) {
|
||||
for (auto& fileSignature : mimeType.mimeType.fileSignatures) {
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
void unregisterMIMEType(const ID& id);
|
||||
|
||||
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:
|
||||
ID nextID { 1 };
|
||||
|
|
Loading…
Reference in a new issue