mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix incorrect ctor order
This commit is contained in:
parent
7a4358800d
commit
23b2d0174a
@ -29,11 +29,11 @@ struct FactoryInfo_t
|
||||
string m_szFactoryName;
|
||||
string m_szFactoryVersion;
|
||||
|
||||
FactoryInfo_t() : m_szFactoryFullName(string()), m_szFactoryName(string()), m_szFactoryVersion(string()), m_pFactoryPtr(nullptr) {}
|
||||
FactoryInfo_t(string factoryFullName, string factoryName, string factoryVersion, uintptr_t factoryPtr) :
|
||||
m_szFactoryFullName(factoryFullName), m_szFactoryName(factoryName), m_szFactoryVersion(factoryVersion), m_pFactoryPtr(factoryPtr) {}
|
||||
FactoryInfo_t(string factoryFullName, uintptr_t factoryPtr) :
|
||||
m_szFactoryFullName(factoryFullName), m_szFactoryName(string()), m_szFactoryVersion(string()), m_pFactoryPtr(factoryPtr) {}
|
||||
FactoryInfo_t() : m_pFactoryPtr(nullptr) {}
|
||||
FactoryInfo_t(const uintptr_t factoryPtr, const string& factoryFullName, const string& factoryName, const string& factoryVersion) :
|
||||
m_pFactoryPtr(factoryPtr), m_szFactoryFullName(factoryFullName), m_szFactoryName(factoryName), m_szFactoryVersion(factoryVersion) {}
|
||||
FactoryInfo_t(const uintptr_t factoryPtr, const string& factoryFullName) :
|
||||
m_pFactoryPtr(factoryPtr), m_szFactoryFullName(factoryFullName) {}
|
||||
};
|
||||
|
||||
#endif // INTERFACE_H
|
||||
|
@ -15,8 +15,8 @@
|
||||
void CFactory::AddFactory(const string& svFactoryName, void* pFactory)
|
||||
{
|
||||
size_t nVersionIndex = GetVersionIndex(svFactoryName);
|
||||
FactoryInfo_t factoryInfo = FactoryInfo_t(svFactoryName, svFactoryName.substr(0, nVersionIndex),
|
||||
svFactoryName.substr(nVersionIndex), reinterpret_cast<uintptr_t>(pFactory));
|
||||
FactoryInfo_t factoryInfo(reinterpret_cast<uintptr_t>(pFactory), svFactoryName,
|
||||
svFactoryName.substr(0, nVersionIndex), svFactoryName.substr(nVersionIndex));
|
||||
|
||||
m_vFactories.push_back(factoryInfo); // Push factory info back into the vector.
|
||||
}
|
||||
@ -61,8 +61,8 @@ void CFactory::GetFactoriesFromRegister(void)
|
||||
size_t nVersionIndex = GetVersionIndex(svInterfaceName);
|
||||
|
||||
// Push back the interface.
|
||||
AddFactory(FactoryInfo_t(svInterfaceName, svInterfaceName.substr(0, nVersionIndex),
|
||||
svInterfaceName.substr(nVersionIndex), reinterpret_cast<uintptr_t>(it->m_pInterfacePtr())));
|
||||
AddFactory(FactoryInfo_t(reinterpret_cast<uintptr_t>(it->m_pInterfacePtr()), svInterfaceName,
|
||||
svInterfaceName.substr(0, nVersionIndex), svInterfaceName.substr(nVersionIndex)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user