mirror of
https://github.com/Z3Prover/z3
synced 2026-02-19 15:04:42 +00:00
Remove redundant default constructors when they're the only constructor (#8461)
* Initial plan * Modernize C++ constructors to use C++11 default member initialization - Phase 1 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix theory_pb.h struct definition - move reset() back inside struct Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Modernize C++ constructors to use C++11 default member initialization - Phase 2 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix opt_solver.h - revert rational initialization (complex type) Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Modernize C++ constructors to use C++11 default member initialization - Phase 3 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Fix sparse_matrix.h - explicitly initialize union member in default constructor Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> * Remove unnecessary default constructors when they're the only constructor Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
This commit is contained in:
parent
04ec450b02
commit
23c531a4c1
24 changed files with 82 additions and 101 deletions
|
|
@ -34,14 +34,14 @@ class overflow_exception : public z3_exception {
|
|||
|
||||
template<bool CHECK>
|
||||
class checked_int64 {
|
||||
int64_t m_value;
|
||||
int64_t m_value = 0;
|
||||
typedef checked_int64 ci;
|
||||
|
||||
rational r64(int64_t i) const { return rational(i, rational::i64()); }
|
||||
|
||||
public:
|
||||
|
||||
checked_int64(): m_value(0) {}
|
||||
checked_int64() = default;
|
||||
checked_int64(int64_t v): m_value(v) {}
|
||||
|
||||
bool is_zero() const { return m_value == 0; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue