VASim
VASim copied to clipboard
Fix undefined behavior in element.cpp
Previously, clearInputs() is declared as:
bool clearInputs(); in include/element.h.
However, in its definition in src/element.cpp, it does not actually have a return statement. This is undefined behavior and causes crashes when compiled using gcc 11.4 (and probably many other versions too!)
This PR changes the type of clearInputs() to a void function to fix this undefined behavior.
It also makes a similar (though less critical) fix to convertThreshold in MNRLAdapter.cpp.