Skip to content

Commit

Permalink
set pointer member variable inital value to nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
yushihang committed Mar 14, 2024
1 parent cab36d2 commit cd26918
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/circom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ struct __attribute__((__packed__)) HashSignalInfo {
struct IODef {
u32 offset;
u32 len;
u32 *lengths;
u32 *lengths = nullptr;
};

struct IODefPair {
u32 len;
IODef* defs;
IODef* defs = nullptr;
};

struct Circom_Circuit {
// const char *P;
HashSignalInfo* InputHashMap;
u64* witness2SignalList;
FrElement* circuitConstants;
HashSignalInfo* InputHashMap = nullptr;
u64* witness2SignalList = nullptr;
FrElement* circuitConstants = nullptr;
std::map<u32,IODefPair> templateInsId2IOSignalInfo;

~Circom_Circuit() {
Expand Down Expand Up @@ -76,12 +76,12 @@ struct Circom_Component {
std::string templateName;
std::string componentName;
u64 idFather;
u32* subcomponents;
bool* subcomponentsParallel;
bool *outputIsSet; //one for each output
std::mutex *mutexes; //one for each output
std::condition_variable *cvs;
std::thread *sbct; //subcomponent threads
u32* subcomponents = nullptr;
bool* subcomponentsParallel = nullptr;
bool *outputIsSet = nullptr; //one for each output
std::mutex *mutexes = nullptr; //one for each output
std::condition_variable *cvs = nullptr;
std::thread *sbct = nullptr; //subcomponent threads

Circom_Component()
: subcomponents(0), subcomponentsParallel(0), outputIsSet(0), mutexes(0), cvs(0), sbct(0)
Expand Down

0 comments on commit cd26918

Please sign in to comment.