Initialize some class attributes.

This commit is contained in:
nemerle 2016-05-06 00:26:52 +02:00
parent 36d95946b3
commit 292e4041e1
2 changed files with 10 additions and 12 deletions

View File

@ -20,10 +20,9 @@ typedef std::shared_ptr<Function> PtrFunction;
struct Disassembler
{
protected:
int pass;
int g_lab;
//bundle &cCode;
QIODevice *m_disassembly_target;
int pass=0;
int g_lab=0;
QIODevice *m_disassembly_target=nullptr;
QTextStream m_fp;
std::vector<std::string> m_decls;
std::vector<std::string> m_code;
@ -31,9 +30,8 @@ protected:
public:
Disassembler(int _p) : pass(_p)
{
g_lab=0;
}
public:
void disassem(PtrFunction ppProc);
void disassem(PtrFunction ppProc, int i);
void dis1Line(LLInst &inst, int loc_ip, int pass);

View File

@ -23,8 +23,8 @@ class PatternLocator {
int numFunc=0; /* Number of func names actually stored */
int numArg=0; /* Number of param names actually stored */
public:
struct HT *ht=nullptr; //!< The hash table
struct PH_FUNC_STRUCT *pFunc=nullptr; //!< Points to the array of func names
struct HT * ht =nullptr; //!< The hash table
struct PH_FUNC_STRUCT * pFunc=nullptr; //!< Points to the array of func names
PatternLocator(QString name) : pattern_id(name) {}
@ -37,10 +37,10 @@ public:
private:
bool readProtoFile();
PerfectHash g_pattern_hasher;
int numKeys; /* Number of hash table entries (keys) */
int numVert; /* Number of vertices in the graph (also size of g[]) */
unsigned PatLen; /* Size of the keys (pattern length) */
unsigned SymLen; /* Max size of the symbols, including null */
int numKeys=0; /* Number of hash table entries (keys) */
int numVert=0; /* Number of vertices in the graph (also size of g[]) */
unsigned PatLen=0; /* Size of the keys (pattern length) */
unsigned SymLen=0; /* Max size of the symbols, including null */
/* Pointers to start of T1, T2 */
uint16_t * T1base = nullptr;
uint16_t * T2base = nullptr;