Skip to content

Commit

Permalink
Fix gen bug with double pointers for arrays in struct fields
Browse files Browse the repository at this point in the history
  • Loading branch information
7Hazard committed Aug 30, 2020
1 parent a62654d commit 1c58f48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ cl::OptionCategory category("capi generator options");
bool isDebugEnabled()
{
// return debugEnabled.getValue();
#ifdef NDEBUG
return false;
#else
return true;
#endif
}

int main(int argc, const char **argv)
Expand Down
4 changes: 2 additions & 2 deletions src/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ struct Typedata
return forwardDecl+ctype+" "+name+"["+std::to_string(array_size)+"]";
}
else {
logd("// ARRAY SIZE WAS 0, outputting as simple pointer");
return forwardDecl+ctype+"* "+name;
// logd("// ARRAY SIZE WAS 0, outputting as simple pointer");
return forwardDecl+ctype+" "+name;
}
}

Expand Down

0 comments on commit 1c58f48

Please sign in to comment.