mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 13:05:24 +08:00
b759049a36
* [angelscript] Update to 2.35.0 * Update version * Fix formatting * Update version * [angelscript] backport patch from trunk * Update version
79 lines
3.0 KiB
Diff
79 lines
3.0 KiB
Diff
commit 4684264c7ed39ff397f9c38c64370284ddac44b0
|
|
Author: angelcode <angelcode@404ce1b2-830e-0410-a2e2-b09542c77caf>
|
|
Date: Thu Dec 10 19:13:44 2020 +0000
|
|
|
|
Changed code to be compatible with pre-C++11
|
|
|
|
git-svn-id: https://svn.code.sf.net/p/angelscript/code/trunk@2686 404ce1b2-830e-0410-a2e2-b09542c77caf
|
|
|
|
diff --git a/angelscript/source/as_module.cpp b/angelscript/source/as_module.cpp
|
|
index 5ec55423..ddd3ed73 100644
|
|
--- a/angelscript/source/as_module.cpp
|
|
+++ b/angelscript/source/as_module.cpp
|
|
@@ -1536,28 +1536,28 @@ int asCModule::UnbindAllImportedFunctions()
|
|
void asCModule::AddClassType(asCObjectType* type)
|
|
{
|
|
m_classTypes.PushLast(type);
|
|
- m_typeLookup.Insert({type->nameSpace, type->name}, type);
|
|
+ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type);
|
|
}
|
|
|
|
// internal
|
|
void asCModule::AddEnumType(asCEnumType* type)
|
|
{
|
|
m_enumTypes.PushLast(type);
|
|
- m_typeLookup.Insert({type->nameSpace, type->name}, type);
|
|
+ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type);
|
|
}
|
|
|
|
// internal
|
|
void asCModule::AddTypeDef(asCTypedefType* type)
|
|
{
|
|
m_typeDefs.PushLast(type);
|
|
- m_typeLookup.Insert({type->nameSpace, type->name}, type);
|
|
+ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type);
|
|
}
|
|
|
|
// internal
|
|
void asCModule::AddFuncDef(asCFuncdefType* type)
|
|
{
|
|
m_funcDefs.PushLast(type);
|
|
- m_typeLookup.Insert({type->nameSpace, type->name}, type);
|
|
+ m_typeLookup.Insert(asSNameSpaceNamePair(type->nameSpace, type->name), type);
|
|
}
|
|
|
|
// internal
|
|
@@ -1569,8 +1569,8 @@ void asCModule::ReplaceFuncDef(asCFuncdefType* type, asCFuncdefType* newType)
|
|
m_funcDefs[i] = newType;
|
|
|
|
// Replace it in the lookup map too
|
|
- asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = nullptr;
|
|
- if(m_typeLookup.MoveTo(&result, {type->nameSpace, type->name}))
|
|
+ asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = 0;
|
|
+ if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(type->nameSpace, type->name)))
|
|
{
|
|
asASSERT( result->value == type );
|
|
result->value = newType;
|
|
@@ -1581,8 +1581,8 @@ void asCModule::ReplaceFuncDef(asCFuncdefType* type, asCFuncdefType* newType)
|
|
// internal
|
|
asCTypeInfo *asCModule::GetType(const asCString &type, asSNameSpace *ns) const
|
|
{
|
|
- asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = nullptr;
|
|
- if(m_typeLookup.MoveTo(&result, {ns, type}))
|
|
+ asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = 0;
|
|
+ if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(ns, type)))
|
|
{
|
|
return result->value;
|
|
}
|
|
@@ -1592,8 +1592,8 @@ asCTypeInfo *asCModule::GetType(const asCString &type, asSNameSpace *ns) const
|
|
// internal
|
|
asCObjectType *asCModule::GetObjectType(const char *type, asSNameSpace *ns) const
|
|
{
|
|
- asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = nullptr;
|
|
- if(m_typeLookup.MoveTo(&result, {ns, type}))
|
|
+ asSMapNode<asSNameSpaceNamePair, asCTypeInfo*>* result = 0;
|
|
+ if(m_typeLookup.MoveTo(&result, asSNameSpaceNamePair(ns, type)))
|
|
{
|
|
return CastToObjectType(result->value);
|
|
}
|