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 struct Disassembler
{ {
protected: protected:
int pass; int pass=0;
int g_lab; int g_lab=0;
//bundle &cCode; QIODevice *m_disassembly_target=nullptr;
QIODevice *m_disassembly_target;
QTextStream m_fp; QTextStream m_fp;
std::vector<std::string> m_decls; std::vector<std::string> m_decls;
std::vector<std::string> m_code; std::vector<std::string> m_code;
@ -31,9 +30,8 @@ protected:
public: public:
Disassembler(int _p) : pass(_p) Disassembler(int _p) : pass(_p)
{ {
g_lab=0;
} }
public:
void disassem(PtrFunction ppProc); void disassem(PtrFunction ppProc);
void disassem(PtrFunction ppProc, int i); void disassem(PtrFunction ppProc, int i);
void dis1Line(LLInst &inst, int loc_ip, int pass); 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 numFunc=0; /* Number of func names actually stored */
int numArg=0; /* Number of param names actually stored */ int numArg=0; /* Number of param names actually stored */
public: public:
struct HT *ht=nullptr; //!< The hash table struct HT * ht =nullptr; //!< The hash table
struct PH_FUNC_STRUCT *pFunc=nullptr; //!< Points to the array of func names struct PH_FUNC_STRUCT * pFunc=nullptr; //!< Points to the array of func names
PatternLocator(QString name) : pattern_id(name) {} PatternLocator(QString name) : pattern_id(name) {}
@ -37,10 +37,10 @@ public:
private: private:
bool readProtoFile(); bool readProtoFile();
PerfectHash g_pattern_hasher; PerfectHash g_pattern_hasher;
int numKeys; /* Number of hash table entries (keys) */ int numKeys=0; /* Number of hash table entries (keys) */
int numVert; /* Number of vertices in the graph (also size of g[]) */ int numVert=0; /* Number of vertices in the graph (also size of g[]) */
unsigned PatLen; /* Size of the keys (pattern length) */ unsigned PatLen=0; /* Size of the keys (pattern length) */
unsigned SymLen; /* Max size of the symbols, including null */ unsigned SymLen=0; /* Max size of the symbols, including null */
/* Pointers to start of T1, T2 */ /* Pointers to start of T1, T2 */
uint16_t * T1base = nullptr; uint16_t * T1base = nullptr;
uint16_t * T2base = nullptr; uint16_t * T2base = nullptr;