Fix saving arguments in wrong order when parsing "Functions" section in gamedata

ke::HashMap doesn't keep the order the elements are added of course. Switch to a vector structure instead.
This commit is contained in:
Peace-Maker
2018-04-21 11:50:07 +02:00
parent d9778021c7
commit 3e2471f93a
3 changed files with 51 additions and 40 deletions
+13 -1
View File
@@ -4,14 +4,26 @@
#include "extension.h"
#include "util.h"
#include <am-string.h>
#include <am-vector.h>
#include <sm_stringhashmap.h>
struct ArgumentInfo {
ArgumentInfo() : name(nullptr)
{ }
ArgumentInfo(ke::AString name, ParamInfo info) : name(name), info(info)
{ }
ke::AString name;
ParamInfo info;
};
class SignatureWrapper {
public:
ke::AString signature;
ke::AString address;
ke::AString offset;
StringHashMap<ParamInfo> args;
ke::Vector<ArgumentInfo> args;
CallingConvention callConv;
HookType hookType;
ReturnType retType;