From 844e1aa5b4f89de2ffc1990824b094c553068642 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Wed, 11 Jan 2017 21:18:08 -0500 Subject: Create qualified name object --- architecture.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'architecture.cpp') diff --git a/architecture.cpp b/architecture.cpp index d0d87df4..657d7bf0 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -746,8 +746,8 @@ void Architecture::SetBinaryViewTypeConstant(const string& type, const string& n bool Architecture::ParseTypesFromSource(const string& source, const string& fileName, - map, Ref>& types, map, Ref>& variables, - map, Ref>& functions, string& errors, const vector& includeDirs) + map>& types, map>& variables, + map>& functions, string& errors, const vector& includeDirs) { BNTypeParserResult result; char* errorStr; @@ -769,21 +769,21 @@ bool Architecture::ParseTypesFromSource(const string& source, const string& file for (size_t i = 0; i < result.typeCount; i++) { - vector name; + QualifiedName name; for (size_t j = 0; j < result.types[i].nameCount; j++) name.push_back(result.types[i].name[j]); types[name] = new Type(BNNewTypeReference(result.types[i].type)); } for (size_t i = 0; i < result.variableCount; i++) { - vector name; + QualifiedName name; for (size_t j = 0; j < result.variables[i].nameCount; j++) name.push_back(result.variables[i].name[j]); types[name] = new Type(BNNewTypeReference(result.variables[i].type)); } for (size_t i = 0; i < result.functionCount; i++) { - vector name; + QualifiedName name; for (size_t j = 0; j < result.functions[i].nameCount; j++) name.push_back(result.functions[i].name[j]); types[name] = new Type(BNNewTypeReference(result.functions[i].type)); @@ -793,8 +793,8 @@ bool Architecture::ParseTypesFromSource(const string& source, const string& file } -bool Architecture::ParseTypesFromSourceFile(const string& fileName, map, Ref>& types, - map, Ref>& variables, map, Ref>& functions, +bool Architecture::ParseTypesFromSourceFile(const string& fileName, map>& types, + map>& variables, map>& functions, string& errors, const vector& includeDirs) { BNTypeParserResult result; @@ -817,21 +817,21 @@ bool Architecture::ParseTypesFromSourceFile(const string& fileName, map name; + QualifiedName name; for (size_t j = 0; j < result.types[i].nameCount; j++) name.push_back(result.types[i].name[j]); types[name] = new Type(BNNewTypeReference(result.types[i].type)); } for (size_t i = 0; i < result.variableCount; i++) { - vector name; + QualifiedName name; for (size_t j = 0; j < result.variables[i].nameCount; j++) name.push_back(result.variables[i].name[j]); variables[name] = new Type(BNNewTypeReference(result.variables[i].type)); } for (size_t i = 0; i < result.functionCount; i++) { - vector name; + QualifiedName name; for (size_t j = 0; j < result.functions[i].nameCount; j++) name.push_back(result.functions[i].name[j]); functions[name] = new Type(BNNewTypeReference(result.functions[i].type)); -- cgit v1.3.1